I am a novice programmer, and I'm trying to understand the Cin Function..
I know there's a lot of problems with this, but i just wanna play around and learn some stuff. I want this program to be able to output the corresponding number when a user inputs one of the three names.. how would that work?
#include <conio.h>
#include <stdio.h>
#include <iostream.h>
int main(void)
{
int Jon=20, Chewwy=25, Popeye=30;
cout<<"Type a name and See the age ";
cin>>Christian;
cin>>Chewwy;
cin>>Popeye;
printf("Press a key to continue...");
getch();
return 0;
}
Any advice is highly needed.