can someone please help me im having trouble completing an assignment for my computer science class (C language) i have to write a pseudo code of this Assuming the number of male students at university in the year 2014 is 4532 and the number of female students in the same year is 6240. If the number of male students grows at an annual constant rate of 3.5 percent while the number of female students grows at an annual constant rate of 2.7 percent, write an algorithm that will decide and print the first year when the number of male students at university will exceed the number of female
So you have number of male and female students. Consider two variables of numbers, one for males and the other for females. Then, 1) Number of males multiplied by the percent increase gives the increase in the rate of males per year 2) Number of females multiplied by the percent increase gives the increase in the rate of females per year. So, if you add this to the existing variables, you will get the total. Now consider a condition when the total of number of males exceed the total number of females. Then, you could find out the year
This will be like your pseudo code, though you could do a better one by also including the variable of the year
thank you
You're welcome :)
Join our real-time social learning platform and learn together with your friends!