Dev - C++ - AYUDA NO ME SALE EL TOTAL A PAGAR

 
Vista:
Imágen de perfil de Relic seiya

AYUDA NO ME SALE EL TOTAL A PAGAR

Publicado por Relic seiya (2 intervenciones) el 06/09/2017 04:38:31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include <conio.h>
 
using namespace std;
int main()
{
	int Bole, EDAD,TOT;
	string NOM;
	cout<<"Escribe tu nombre completo:\n ";
		cin >> NOM;
	cout<<"Escribe tu edad: " <<endl;
		cin >> EDAD;
	TOT= (Bole*70);
	if (EDAD>=18)
	{
		cout << "¿Escribe cuantos boletos quieres?\n ";
		cin >> Bole;
		cout<<"Tu total sera de:"<<endl;
 
	}
	else
	{
		cout << "No se le puede vender boletos\n ";
	}
getch();
}

-EL PROGRAMA ME CORRE NORMAL EL ELSE, PERO AL INGRESAR LA EDAD MAYOR A 18 NO ME SACA EL TOTAL A PAGAREN LA COMPRA DE LOS BOLETOS

Sin-titulo
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
Imágen de perfil de Krlos Kstro
Val: 8
Ha aumentado su posición en 3 puestos en Dev - C++ (en relación al último mes)
Gráfica de Dev - C++

AYUDA NO ME SALE EL TOTAL A PAGAR

Publicado por Krlos Kstro (4 intervenciones) el 07/09/2017 02:45:39
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
int Bole, EDAD,TOT;
string NOM;
cout<<"Escribe tu nombre completo:\n ";
	cin >> NOM;
cout<<"Escribe tu edad: " <<endl;
	cin >> EDAD;
 
if (EDAD>=18)
{
	cout << "¿Escribe cuantos boletos quieres?\n ";
	cin >> Bole;
 
	TOT= (Bole*70);
 
	cout<<"Tu total sera de:"<<TOT<<endl;
 
}
else
{
	cout << "No se le puede vender boletos\n ";
}
getch();

MUEVE TOT A ESE LUGAR....

Saludos
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