C   89

parametros

Guest on 27th April 2022 02:04:12 AM

  1. include <stdio.h>
  2.  
  3. int soma (int x, int y) {
  4.   x += 1;
  5.   y -= 1;
  6.   printf ("Soma de x e y: %d\n", x + y);
  7.   return (x + y);
  8. }
  9.  
  10. main () {
  11.   int a, b;
  12.  
  13.   printf ("Digite o valor de a: ");
  14.   scanf ("%d", &a);
  15.  
  16.   printf ("Digite o valor de b: ");
  17.   scanf ("%d", &b);
  18.  
  19.   printf ("Soma de a e b: %d\n", soma(a, b));
  20.   printf ("a: %d\n", a);
  21.   printf ("b: %d\n", b);
  22. }

Raw Paste


Login or Register to edit or fork this paste. It's free.