Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a,b;
  6. char sinal;
  7.  
  8.  
  9. printf("Digite um numero:%d",a);
  10. scanf("%d",&a);
  11. printf("Digite outro numero:%d",b);
  12. scanf("%d",&b);
  13. printf("Escolha uma operação matematica:+ - * / %c",sinal);
  14. scanf("%d",&sinal);
  15.  
  16. if (a+b){
  17. printf("A soma entre:%d\n",a+b);
  18. }
  19. else if (a-b){
  20. printf("A subtração entre:%d\n",a-b);
  21. }
  22. else if (a*b){
  23. printf("A multiplicação entre:%d\n",a*b);
  24. }
  25. else if (a/b);{
  26. printf("A divisão entre:%d\n",a/b);
  27. }
  28. if (a%b){
  29. printf("O resto dadivisão entre:%d\n",a%b);
  30. }
  31. return 0;
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement