Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int number,answer=0;
- printf("enter a number ");
- scanf("%d",&number);
- for (; 0<number; number--)
- {
- answer=number+answer;
- }
- printf("answer,%d",answer );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement