Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include<stdio.h>
  2. main()
  3. {
  4. char R[1];
  5. int S, SQ, Nc, Vt;
  6. Nc=1000;
  7. Vt=10000;
  8. while(R!="N" || Nc>0)
  9. {
  10. printf("limite:%d",Vt);
  11. printf("nDigite quanto deseja sacar:");
  12. scanf("%d",S);
  13. SQ=S/10;
  14.  
  15. if ((S <0) || (S > Vt) || (S % 10 != 0))
  16. printf("Valor invalido");
  17.  
  18. printf("nDeseja realizar outro saque? [S/N]");
  19. scanf("%s",&R);
  20.  
  21. if ((S%10==0) && (S<Vt))
  22. printf("%d nota(s) de 10.", SQ);
  23.  
  24. printf("Deseja realizar outro saque? [S/N]");
  25. scanf("%s",&R);
  26. Vt=Vt-S;
  27. Nc=Nc-SQ;
  28.  
  29. if (Nc = 0)
  30. printf("Sem notas");
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement