bulfaitelo

Prova

Jun 20th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<math.h>
  4.  
  5. main()
  6. {
  7.     float n = 0, m = 0, t = 0;
  8.  
  9.     printf("numero da raiz");
  10.     scanf("%f", &n);
  11.     If(n > 0)
  12.    
  13.         while (m<n);
  14.         {
  15.        
  16.             m = (m + 1);
  17.             if (m % 2 != 0)
  18.  
  19.                 t = (t + 1);
  20.  
  21.         }
  22.         n = sqrt(n);
  23.         if (n == t)
  24.        
  25.             printf("perf");
  26.    
  27.         else
  28.        
  29.             printf("impf");
  30.        
  31.  
  32.    
  33. }
Advertisement
Add Comment
Please, Sign In to add comment