67 069
Assignments Done
99,3%
Successfully Done
In November 2018

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)
Expert's answer
#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

Submit
Privacy policy Terms and Conditions