0
How to made pattern using for
hello, how can i make this pattern using only for 5 10. 15 4 9 14 3 8 13 2 7 12 1 6 11 thank you
1 Antwort
+ 3
Do you even need the dot between the 10 and the 15?
If not, you may use this code :
#include<iostream>
#include<iomanip>
using std::cout, std::endl, std::setw, std::left;
int main()
{
for(int i=0;i<5;i++)
{
cout<<left<<setw(4)<<5-i;
cout<<left<<setw(4)<<10-i;
cout<<left<<setw(4)<<15-i<<endl;
}
}