Answer to Question #4009 in C++ for ashutosh

Question #4009
My question is
& write c++ program that print 4 integer and then print them in opposite, & please help.
1
Expert's answer
2012-03-22T12:48:40-0400
#include <iostream>
using namespace std;
int main ()
{
int a[4] = { 1, 2, 3, 4};
cout<< "4 integer: ";
for (int i=0 ; i < 4 ; i++)
& cout<< a[i]<< ' '; cout<<endl;

cout<< "4 integer in opposite: ";
for (int i=3 ; i >= 0 ; i--)
& cout<< a[i]<< ' '; cout<<endl;




system("pause");
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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS