#include<iostream>
#include<stdio.h>
#include<string.h>
#include<windows.h>
usingnamespace std;
int main ()
{
char a[20],b[20]="apple";
cout<<"Guess my favorite fruit:";
gets(a);
while(strcmp(a,b)!=0)
{
cout<<"Try again:";
gets(a);
}
cout<<"You guess! My favorite fruit is ";
system("COLOR A");
cout<<"apple!";
return 0;
}
---
Guess my favorite fruit:orange
Try again:apple
You guess! My favorite fruit is apple!
---
How can i do it also with int vector?
And how's the difference from char[] and int[] ?
You can also contact me to help me with more :D [https://www.facebook.com/Bossul13333 ]
http://www.cplusplus.com/user/RadWayne/ @RadWayne thanks! :D send to me a friend resqure via facebook and... Can you send to me this program "guess my favorite...." made by int vectors? please! :)