i need to make a program that would display the figure as shown below. using a DO-WHILE structure and a method to implement the task.
a C++ program.
output:
0
0 2
0 2 4
0 2 4 6
0 2 4 6 8
0 2 4 6 8 10
this is my draft:
#include <iostream>
using namespace std;
int main ()
{
int x=0;
int y=10;
do{
(x=0, y<0);
cout <<x<<endl;
}while
(y=x+2, y>=0);
cout<<y<<endl;
return 0;
}
is not working :(