Dev - C++ - INVERTIR EL TRIANGULO

 
Vista:
sin imagen de perfil

INVERTIR EL TRIANGULO

Publicado por CHARLY (10 intervenciones) el 16/05/2017 22:47:07
NECESITO INVERTIR LA DIRECCION DEL TRIANGULO QUE APUNTE HACIA LA IZQUIERDA ALGUIEN POR FAVOR ME PUEDA AYUDAR..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<iostream>
 
using namespace std;
 
int main () {
 
int i,j,n=10;
      for(i=1;i<=n;i++){
        for(j=1;j<=i;j++)
            cout<<" *";
            cout<<endl;
    }
 
    for(i=n;i>=1;i--){
        for(j=1;j<i;j++)
            cout<<" *";
            cout<<endl;
    }
return 0;
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 661
Bronce
Ha mantenido su posición en Dev - C++ (en relación al último mes)
Gráfica de Dev - C++

INVERTIR EL TRIANGULO

Publicado por agustin (522 intervenciones) el 17/05/2017 07:38:35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<iostream.h>
 
using namespace std;
 
int main () {
    int i,j,n=10;
 
    for(i=1;i<=n;i++){
        for(j=n;j>i;j--)
            cout << "  ";
        for(j=1;j<=i;j++)
            cout << " *";
        cout << endl;
    }
 
    for(i=n;i>=1;i--){
        for(j=n;j>=i;j--)
            cout << "  ";
        for(j=1;j<i;j++)
            cout << " *";
        cout << endl;;
    }
    return 0;
}
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar
sin imagen de perfil

INVERTIR EL TRIANGULO

Publicado por CHARLY (10 intervenciones) el 17/05/2017 18:22:39
Gracias!!!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar