Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int x,y;
- printf("enter the two number:");
- scanf("%d%d",&x,&y);
- if(y> 0)
- {
- while(y!=0)
- {
- x++;
- y--;
- }
- }
- else if(y< 0)
- {
- while(y!=0)
- {
- x--;
- y++;
- }
- }
- printf("sum of value is %d",x);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement