Advertisement
dllbridge

Untitled

Dec 2nd, 2023
568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.53 KB | None | 0 0
  1.  
  2.  
  3. #include     <stdio.h>
  4.  
  5.  
  6.  
  7. char paper();    
  8.  
  9.  
  10. ////////////////////////////////////////////////////  
  11. int main()                                        //  
  12. {
  13.    
  14.    
  15.     for(int i = 0; i < 13; i++)
  16.     {  
  17.         printf("%c", paper() );
  18.     }
  19.    
  20. }
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. /////////////////////////////////////////////////////
  30. char paper()                                       //
  31. {
  32.    
  33.  
  34.     static int i = 0;
  35.    
  36.     char sz[40] = "SONY Pictures";
  37.  
  38.  
  39.  
  40. return sz[i++];
  41. }
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. /* 
  52. #include     <stdio.h>
  53.  
  54.  
  55. int   n = 4   ;
  56.  
  57. float f = 1.9999999;
  58.  
  59.  
  60.  
  61. ////////////////////////////////////////////////////  
  62. int main()                                        //  
  63. {
  64.    
  65.     int nRes = n + (int)f;
  66.    
  67.     printf("%d  \n", nRes);
  68.    
  69.     n = (int)f;  
  70. }
  71.  
  72. */
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101. /*
  102. #include     <stdio.h>
  103. #include     <iostream>
  104. using namespace std;
  105.  
  106.  
  107. int   max(  int n1, int   n2);      
  108. float max(float f1, float f2);    
  109.  
  110.  
  111.  
  112. ////////////////////////////////////////////////////   (char(*)( ) )
  113. int main()                                        //   (int(*)(int))
  114. {
  115.    
  116.    
  117.  
  118.     cout <<   max(73   , 21    ) << endl;
  119.     cout <<   max( 1.77,  3.55 );
  120. }
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. //////////////////////////////////////////////
  131. int max(int n1, int n2)                     //
  132. {
  133.    
  134.     if(n1 > n2) return n1;
  135.    
  136. return n2; 
  137. }
  138.  
  139.  
  140.  
  141.  
  142.  
  143. //////////////////////////////////////////////
  144. float max(float f1, float f2)             //
  145. {
  146.    
  147.     if(f1 > f2) return f1;
  148.    
  149. return f2; 
  150. }
  151.  
  152.  
  153.  
  154.  
  155. */
  156.  
  157.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement