write a program which produces the given sequence numbers.(in alternate arrangement) using the three looping statements
#include <iostream>
using namespace std;
int main()
{
cout << 1 << "," << 5;
for (int i = 2, j = 4; i < 6; i++, j--)
{
cout <<","<< i << "," << j;
}
cout << "\n";
system("pause");
return 0;
}
Comments
Leave a comment