Answer to Question #4009 in C++ for ashutosh
My question is
& write c++ program that print 4 integer and then print them in opposite, & please help.
1
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment