Advertisement
rfmonk

v.011.c

Oct 23rd, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. // write a program that repeatedly accepts user input and then prints
  2. // the numbers between 0 and the entered number. If the user enters
  3. // less than or equal to zero, the program will exit
  4. #include <stdio.h>
  5.  
  6. int main()
  7. {
  8.     int i;
  9.     for (i = 0; i < n; i++){
  10.  
  11.     printf("Enter a number: ");
  12.     scanf("%d", &i);
  13.     printf("Your number is %d and half of that is %d * .5", i);
  14.     return(0);
  15.     }
  16.    
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement