Dec 22, 2015 at 7:18pm UTC
Help me please.Need to do coding about student information.The problem is my coding wont show any input and output...Here is my coding
#include <iostream>
#include <iomanip>
using namespace std ;
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
struct student
{
char sNama[100] ;
char sProgram[50] ;
int sKodprogram ;
char sAlamat[100] ;
int sIC ;
char sEmel[100] ;
int sTelNo ;
int sCurrentSem ;
char sGender ;
} ;
void printstudent(student s)
{
cout<<"Student Information" <<endl ;
cout<<"Name :" <<s.sNama[100] ;
cout<<"I/C NO :" <<s.sIC ;
cout<<"Gender :" <<s.sGender ;
cout<<"Adress :" <<s.sAlamat[100];
cout<<"Contact No :" <<s.sTelNo ;
cout<<"Programme :" <<s.sProgram[50] ;
cout<<"Programme Code:" ;
cin>>s.sKodprogram ;
cout<<"Semester :" <<s.sCurrentSem ;
}
void input(student s)
{
cout<<"Name :" ;
cin>>s.sNama[100] ;
cout<<"I/C NO :" ;
cin>>s.sIC ;
cout<<"Gender :" ;
cin>>s.sGender ;
cout<<"Adress :" ;
cin>>s.sAlamat[100];
cout<<"Contact No :" ;
cin>>s.sTelNo ;
cout<<"Programme :" ;
cin>>s.sProgram[50] ;
cout<<"Programme Code:" ;
cin>>s.sKodprogram ;
cout<<"Semester :" ;
cin>>s.sCurrentSem ;
}
int main()
{
void input(student s) ;
void printstudent(student s) ;
system("pause" ) ;
return 0;
}
Last edited on Dec 22, 2015 at 11:33pm UTC
Dec 22, 2015 at 11:33pm UTC
thanks guys...got settle the problem :)