Advertisement
tomateblue

Multiplicação em C com Scanf

Jun 14th, 2016
219
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. // Multiplicação total
  13.   total = n1 * n2; // Multiplicação
  14.   printf("MUltiplicacao: %i",total);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement