User Profile
Collapse
-
nvm every thing is good -
ok so in the code i defind a string with 5 slots called x, than i gave a while condition, as long as the first2/3 slots in the string are != y,e,s or n,o the loop will keep going ,now i scanf the x'if x == yes it will print some thing if x==no it will print something else.now if it isnt yes or no the condition in the while will stay as it is so it will loop once more untill x will be changed into yes or no. so in this case i did it with 1 string,now...Leave a comment:
-
ok let me tell you exactly what i am trying to do.
...Code:void Q_2() { char x[5]="0"; while((x[0]!= 'y' && x[1] != 'e' && x[2]!= 's') && (x[0]!= 'n' && x[1]!= 'o')) { printf("your name is ***?\n"); scanf("%s",&x); if(x[0]== 'y' && x[1] == 'e' && x[2]== 's') { printf("hi *** i amLeave a comment:
-
help formulating strcmp calls
Hello every body i am new to this community and new to proggraming at all i would like to get some help with a strcmp command which i have promlems with.
well take a look at what i have and what i am try to reach:
...Code:void Q_3() { char p[4]="yes";/i dont know if "yes" "no" is what i should do char j[4]="no"; while( !strcmp(* "p",* "j"));//this is
No activity results to display
Show More
Leave a comment: