[C con Clase] Estructuras

jesus sagñay jesusagnay1 en hotmail.com
Mie Mayo 11 19:40:24 CEST 2011


Estoy practicando estrcuturas tengo este ejemplo 
 
ingresar nombre,cedula,edad,nota1,nota2,nota3 y promedio.
 
Haci lo ice esta
 
#include<iostream.h>
#include<conio.h>
void main()
{
struct Alumno{
  char Nombre [65];
  int Edad;
  int Cedula;
  float Nota1;
  float Nota2;
  float Nota3;
  float Promedio;
      }Jesus;
             int i,cont=3;
      float suma=0,Promedio;
 
             {
  cout<<"Ingrese Apellido Nombre: ";
  cin>>dato[i].Nombre;
  cout<<"Ingrese Edad: "<<endl;
  cin>>dato[i].Edad;
  cout<<"Ingrese Cedula de Cuidadania: "<<endl;
  cin>>dato[i].Cedula;
  cout<<"Ingrese Nota1: "<<endl;
  cin>>dato[i].Nota1;
  cout<<"Ingrese Nota2: "<<endl;
  cin>>dato[i].Nota2;
  cout<<"Ingrese Nota3: "<<endl;
  cin>>dato[i].Nota3;
  cout<<"Ingrese Promedio: "<<endl;
  cin>>dato[i].Promedio;
 
  suma=dato[i].nota1+dato[i].nota2+dato[i].nota3;
       }
  Promedio=suma/cont;
getch();
}
 
Ayudame corrijiendo los errores
 
Gracias,
 
Jesus 		 	   		  
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.conclase.net/pipermail/cconclase_listas.conclase.net/attachments/20110511/0d76f4c3/attachment.html>


Más información sobre la lista de distribución Cconclase