I just started programming a week ago I'm really I'm glad I found this website and thank you for you help......instead of the ending the program how would I get back to gets I don't care for loops I just wanna try and instead of gets what should I use for this program
Code:
#include <stdio.h>
int main (int argc, const char * argv[]) {
const char *david = "david",*steven = "steven", *daniel = "daniel";
char bob[10];
printf("\nname:");
gets (bob);
if ( strcmp(bob, steven) == 0) {
printf("steven is cool");
}
if ( strcmp(bob, david) == 0) {
printf("david is not");
}
if ( strcmp(bob, daniel) == 0) {
printf("daniel mabye");
}
return 0;
}