Anyone out there pliz help me.am new to c++ and the program am supposed to write has to accept
- 19 country names
- there populations
- growth const
and i have to use a formula (population*growth const) to find the growth of the country.
dispalay sholud be like as below.
country_name population growth_const growth
here is what i have tried
#include<iostream.h>
#include<conio.h>
char country[20];
int grth_const[20];
int pop[20]
int i;
int growth[20]
void main()
{
clrscr();
for (i=o;i<=19;i++)
{
cout<<"Enter country name";
cin>>country[i]; //the country name is supposed to be stored into an array of countries since ther are loads to be entered
cout<<"Enter population"; //this is the population of the countries above
cin>>pop[i];
cout<<"enter growth rate";
cin>>grth_const[i];
growth[i]=pop[i]*grth_const[i];
}
for(int b=0;b<=19;b++)
{
cout<<country[i]<<pop[i]<<grth_const[i]<<growth[i];
}
}