### Please Help Me with This Program. It is Urgent

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.

Y = 1/3 + 2/5 + 3/7 + ...........+ 1000/2001

Please help me out on this two program. Thanks.
You need to have a go first. Show the particular piece of code that you're stuck on. Nobody is going to do your homework for you.
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.
You probably know your maths.
A for loop is a pretty good idea :)
Please show us some of your source code so that we can
help you with this!
easy but if i write code here it will not good for you. please work hard. this forum is to help you by sharing ideas. no one here to do homework
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;
}

`cin >> count;` is having the user input the value for `count`

I think you meant

`cout << count;`

Also you need to initialize variable `count` an initial value. 0 will work.
Topic archived. No new replies allowed.