Do- while
BY
JOSE MIGUEL BRICEÑO
JOSE MIGUEL BRICEÑO
WWW.M3TALIJOX.ES.TL
la funcion "endl" sirve para dar salto de lineas
#include<iostream.h>
void main()
{
float n1,n2,n3,pt;
char nom[13],CI[10], resp;
int k=0;
do
{
cout<<endl<<endl<<endl<<"ingrerse nombre :"<<k+1<<endl;
cin>>nom;
cout<<endl<<"ingres cedula"<<endl;
cin>>CI;
cout<<endl<<"ingrese nota 1"<<endl;
cin>>n1;
cout<<endl<<"ingrse nota 2"<<endl;
cin>>n2;
cout<<endl<<"ingrese nota 3"<<endl;
cin>>n3;
pt=(n1+n2+n3)/3;
cout<<"el promedio es"<<pt;
cout<<endl<<"desea finalizar? S,N"<<endl;
cin>>resp;
k++; //Contador
}
while(resp=='N' || resp=='n');
}