Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // write a program that repeatedly accepts user input and then prints
- // the numbers between 0 and the entered number. If the user enters
- // less than or equal to zero, the program will exit
- #include <stdio.h>
- int main(void)
- for (i = 0; i >= 1; if i <= 0 return(0));
- {
- printf("Enter a number: ");
- scanf("%d", &i);
- printf("Your number is %d and half of that is %d * .5", i);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement