Answer to Question #16454 in C++ for NG

Question #16454
write a program to read 100 numbers from the user and print them in a reverse order but separated positive and negative(using classes)
1
Expert's answer
2012-10-18T07:47:17-0400
#include <iostream>

using namespace std;

class number{
public:
int data;
};
int main()
{

number numbers[100];
for(int i=0;i<10;i++){
cout<<"Enter number: ";
cin>>numbers[i].data;
}
for(int i=9;i>=0;i--){
cout<<numbers[i].data<<" ";
}
int k;
cin>>k;
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal