Está en la página 1de 1

//pregunta 4

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int ano=0,mes[12],i=0;
float
ingreso=0,egreso=0,gasto=0,ingresomenor=0,ingresototal=0,egresototal=0,egresomenor=
0;

cout<<"\nINGRESE A�O: "; cin>>ano;

for( i=0; i<12; i++)


{
cout<<"\nDIGITE MES: ";cin>>mes[i];
cout<<"\n-> INGRESO: "; cin>>ingreso;
cout<<"\n-> GASTOS: "; cin>>gasto;

egreso=ingreso-gasto;

cout<<"\nSU EGRESO DEL MES " <<mes[i]<< " ES: "<<egreso<<endl;

ingresototal=ingresototal+ingreso;
egresototal=egresototal+egreso;
if(i==0)
{ingresomenor=mes[i];}
if(egreso<50)
{cout<<"\nMES " <<mes[i]<< " CON DEFICIT"<<endl;}
}
cout<<"\n - MENOR INGRESO : "<<ingresomenor<<endl;
cout<<"\n - INGRESO TOTAL : "<<ingresototal<<endl;
cout<<"\n - EGRESO TOTAL : "<<egresototal<<endl;
return 0;
}

También podría gustarte