Write a program that prints the numbers 1 to 4 on the same line with each pair of adjacent numbers separated by one space.
#include <iostream>
using namespace std;
int main()
{
for(int i=1;i<=4;i++){
cout<<i<<" ";
}
cout<<"\n";
return 0;
}
Comments
Leave a comment