Advertisement
Maplewing

11/28 C: Function (main.c)

Nov 27th, 2015
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "sum.h"
  3.  
  4. int main(){
  5.     int a, b;
  6.     scanf("%d%d", &a, &b);
  7.    
  8.     // int sumA = sum(a);
  9.     /*
  10.         int sumA = sum(5);
  11.         => int sumA = 15;
  12.         int sumA = sum(5) * 8 + 4;
  13.         => int sumA = 15 * 8 + 4;
  14.     */
  15.     // int sumB = sum(b);
  16.    
  17.     printf("%d\n", sum(a));
  18.     printf("%d\n", sum(b));
  19.    
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement