Advertisement
tomateblue

Subtração e C em Scanf

Jun 14th, 2016
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.   int n1,n2,total;
  6. // get n1
  7.   printf("n1: ");
  8.   scanf("%d",n1);
  9. // get n2
  10.   printf("n2: ");
  11.   scanf("%d",n2);
  12. // Subtração total
  13.   total = n1 - n2; // Divisão
  14.   printf("Subtracao: %i",total);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement