Advertisement
dllbridge

Untitled

Oct 13th, 2024
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.67 KB | None | 0 0
  1.  
  2. #include   <stdio.h>
  3. int summa(int n2);
  4. int summa(int n1, int n2);
  5. double summa(double n1, double n2);
  6.  
  7. ///////////////////////////////////////////
  8. int main()
  9. {
  10.    
  11.  
  12.     printf("summa =  %d  \n", summa(300     ));            
  13.     printf("summa =  %d  \n", summa(3  , 2  ));    
  14.     printf("summa =  %.2f\n", summa(3.2, 2.1));  
  15. return 0;
  16. }
  17.  
  18.  
  19. ///////////////////////////////////////////
  20. double summa(double n1, double n2)
  21. {
  22.    
  23. return n1 + n2;    
  24. }
  25.  
  26.  
  27.  
  28. ///////////////////////////////////////////
  29. int summa(int n1, int n2)
  30. {
  31.    
  32. return n1 + n2;    
  33. }
  34.  
  35.  
  36. ///////////////////////////////////////////
  37. int summa(int n2)
  38. {
  39.    
  40. return 7 + n2;    
  41. }
  42.  
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement