Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- main()
- {
- char R[1];
- int S, SQ, Nc, Vt;
- Nc=1000;
- Vt=10000;
- while(R!="N" || Nc>0)
- {
- printf("limite:%d",Vt);
- printf("nDigite quanto deseja sacar:");
- scanf("%d",S);
- SQ=S/10;
- if ((S <0) || (S > Vt) || (S % 10 != 0))
- printf("Valor invalido");
- printf("nDeseja realizar outro saque? [S/N]");
- scanf("%s",&R);
- if ((S%10==0) && (S<Vt))
- printf("%d nota(s) de 10.", SQ);
- printf("Deseja realizar outro saque? [S/N]");
- scanf("%s",&R);
- Vt=Vt-S;
- Nc=Nc-SQ;
- if (Nc = 0)
- printf("Sem notas");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement