14 Reputation Points
Ranked #2K
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
100% Quality Score
- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #72.8K
~493 People Reached
About Me
Small time programmer.Schizophrenic.Enjoy programming experience. Like to travel and see lot of places.Fun.
- Interests
- Isaac Asimov fav. author, trekking,reading,fun games etc
- PC Specs
- lenovo
Favorite Forums
Favorite Tags
c x 2
2 Posted Topics
Re: void main() { int i,j,swap=1; int arre[5],prod[5]; clrscr(); printf("nter values in the array "); for(i=0;i<5;i++) scanf("%d",&arre[i]); for(j=0;j<5;j++) { for(i=0;i<5;i++) { if(i==j) continue; else swap=swap*arre[i]; } prod[j]=swap; swap=1; } printf("The output is "); for(j=0;j<5;j++) printf("%d",prod[j]); getch(); } | |
Re: I will show you how to swap numbers. void main() { int x, y; clrscr(); printf("Enter two positive numbers"); scanf("%d%d",&x,&y); y=y+x; x=y-x; y=y-x; printf("The swapped numbers are %d and %d",x,y); getch(); /* Comments: Let x=3 and y=4; so y=x+y will give y= 3+4 y=7 x=3 x=y-x will give x = … |
The End.