Está en la página 1de 3

# include <conio.

h>

# include <iostream>

using namespace std;

main()

int x;

cout<<" ESTE PROGRAMA VISUALIZA UNA SERIE DE NUMEROS DEL 1 AL 20\n";

for(x=1;x<=20;x++)

cout<<x<<" ";

cout<<" \nESTE PROGRAMA VISUALIZA UNA SERIE DE NUMEROS DEL 20 AL 1\n ";

for(x=20;x>=1;x--)

cout<<x<<" ";

}
# include <conio.h>

# include <iostream>

using namespace std;

main()

int x;

cout<<" ESTE PROGRAMA VISUALIZA UNA SERIE DE NUMEROS DEL 1 AL 20\n";

x=1;

while (x<=20)

cout<<x<<" ";

x++;

cout<<" \nESTE PROGRAMA VISUALIZA UNA SERIE DE NUMEROS DEL 20 AL 1\n ";

x=20;

while (x>=1)

cout<<x<<" ";

x--;

getch();

}
# include <conio.h>

# include <iostream>

using namespace std;

main()

int x;

cout<<" ESTE PROGRAMA VISUALIZA UNA SERIE DE NUMEROS DEL 1 AL 20\n";

x=1;

do

cout<<x<<" ";

x++;

while (x<=20);

cout<<" \nESTE PROGRAMA VISUALIZA UNA SERIE DE NUMEROS DEL 20 AL 1\n";

x=20;

do

cout<<x<<" ";

x--;

while (x>=1);

También podría gustarte