Write a C++ program that will ask the user to enter not greater than to 15 numbers
(decimal numbers are accepted). And Sort the 15 inputs(ascending).
#include
#include
#include
using namespace std;
float a[15];
main()
{
char choice,c;
int cnt,temp2,cnt1;
cout<<"Enter 15 numbers: "; for(cnt=1;cnt<=15;cnt++) { cin>>a[cnt];
}
cout<<"Sort values are: "; for(cnt=1;cnt<=15;cnt++) { for(cnt1=1;cnt1<=15;cnt1++) { if(a[cnt]<= 15; cnt++) { cout <<>
if(c == 'Y' || c == 'y')
{
return main();
}
else if (c == 'N' || c == 'n') {
return 0;}
getch();
Output:
5 comments:
kevz! after 1 yr pa ka nka post ba? grabe! hehe
awww.....
dugay nmn ko nag buhat g tamd mn gud ko sa una...hehehe,,,pewo krn e try nako na e update akng blog...nyahahahah....
i always ni update! ejjeej!
lage e update ko nimo always kng ala koy lingaw....
heheheheh,,
@__@
unsang kung wla kay lingaw? dpat maskin naa kay lingaw iiupdate? ibutang imu kalagot dri sa OSAD!! haha! nawala naman gud 2ng blog nko na naay kalagot..hehe!
Post a Comment