Program ma działaś tal:
-Wypisuje tylko duże litery (Gdy zostanie wpisana mała ma sie skończyć program)
-po trzecim ! ma sie kończyć program
Wiec o to moj kod ale nie działa za bardzo czemu ? :
#include <stdio.h>
#include <stdlib.h>
int main(){
int c;
while (c=getchar()) {
if (c=='a'||'b'||'c'||'v'||'b'||'n'||'m'||'a'||'s'||'d'||'f'||'g'||'h'||'j'||'k'||'l'||'q'||'w'||'e'||'r'||'t'||'y'||'u'||'i'||'o'||'p'){
exit (EXIT_SUCCESS);
}
if (c=='!') {
printf("Wykrzyknik 1 ");
while (c=getchar()){
if (c=='a'||'b'||'c'||'v'||'b'||'n'||'m'||'a'||'s'||'d'||'f'||'g'||'h'||'j'||'k'||'l'||'q'||'w'||'e'||'r'||'t'||'y'||'u'||'i'||'o'||'p'){
exit(EXIT_SUCCESS);
}
if(c=='!') {
printf ("wykrzyknik 2");
while(c=getchar()){
if (c=='a'||'b'||'c'||'v'||'b'||'n'||'m'||'a'||'s'||'d'||'f'||'g'||'h'||'j'||'k'||'l'||'q'||'w'||'e'||'r'||'t'||'y'||'u'||'i'||'o'||'p')
{ exit(EXIT_SUCCESS);
}
if (c=='!'){
exit(EXIT_SUCCESS);
}
}
}
}
}
}
return 0;
}
Prosze o pomoc