Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main ()
- {
- int a=1,A=1,b=1,B=1,i=1,I=1,j=1,J=1;
- char s[100];
- while (scanf("%[^\n]%*c",&s)!=EOF){
- if(strcmp("esquerda",s)==0){
- if(a==1){
- printf("ingles\n");
- a=0;
- b=1;
- i=1;
- j=1;
- }
- }
- if(strcmp("direita",s)==0){
- if(b==1){
- printf("frances\n");
- b=0;
- a=1;
- i=1;
- j=1;
- }
- }
- if(strcmp("nenhuma",s)==0){
- if(i==1){
- printf("portugues\n");
- i=0;
- a=1;
- b=1;
- j=1;
- }
- }
- if(strcmp("as duas",s)==0){
- if(j==1){
- printf("caiu\n");
- j=0;
- a=1;
- b=1;
- i=1;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement