Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main (void)
  4. {
  5.  
  6.  
  7. {
  8.     int ans;
  9.     printf("\n\n Enter an Integer: ");
  10.     scanf("%d",&ans);
  11.  
  12.     if (ans==0)
  13.     {
  14.         printf("\n\nStart Again\n\n");
  15.  
  16.     }else{
  17.  
  18.         if (ans%2==0)
  19.         {
  20.              printf("\n\n Even and being Divided by 2: %f", (float)ans/2);
  21.  
  22.         }else{
  23.             printf("\n\n Odd and being multiplied by 3: %d", ans*3);
  24.         }
  25.         }
  26.  
  27.     }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement