Hello good people. Please help me with this C++ program. It is an assignment and I need to submit it as soon as possible.
1. A university has 200 student for a start, the student increase at a ratio of 20% yearly. How long will it take the university to have a population of 10,000? Write a C++ program to solve the problem.
2. Write a C++ program to calculate the value of y.
if you can figure out how to do the maths then writing the programs shouldn't be a problem. try figure it out on paper first then focus on the programming
Am thinking of using a for loop for the first question and using using an increment operator for the counting. Pls help me out. I will be writing this exam in three days time.
Thanks. This was what I came up with. But its giving me a blank output. No result
#include <iostream>
using namespace std;
int main ()
{
int count, p;
for(int p=200; p<=10000; p++) //where p is the population
p = 200 + ((200/100) * 20);
count += p;
cin >> count;
return 0;
}