I am right now learning about making a program using Borland, so this is my first time on use it. I got confused by the result, cause the result is not what I expected.
Below is my code:
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
char nama[25];
char kelas[5];
char jurusan[30];
char universitas[30];
char alamat[30];
cout<<"Masukkan Nama Anda\t : ";
gets(nama);
cout<<endl;
cout<<"Kelas\t\t\t : ";
gets(kelas);
cout<<endl;
cout<<"Jurusan\t\t\t : ";
gets(jurusan);
cout<<endl;
cout<<"Universitas\t\t : ";
gets(universitas);
cout<<endl;
cout<<"Alamat\t\t\t : ";
gets(alamat);
cout<<endl;
cout<<"\n\tBIODATA ANDA SEBAGAI MAHASISWA ADALAH SEBAGAI BERIKUT:"<<endl;
cout<<"\n\nNama\t\t\t : "<<nama<<endl;
cout<<"Kelas\t\t\t : "<<kelas<<endl;
cout<<"Jurusan\t\t\t : "<<jurusan<<endl;
cout<<"Universitas\t\t : "<<universitas<<endl;
cout<<"Alamat\t\t\t : "<<alamat<<endl;
cout<<"\n\nSilahkan tekan tombol ENTER untuk keluar dari program biodata singkat ini!";
getch();
}
The result I got is kinda fine, but there is still one problem that I got here. Which there is one variable that don't show what the value of the user already gave, it did not show the value, it even just gave the word "u" which I don't understand from where this word was coming. I sent it with my picture, so you can see it.
I hope you would help me, and thank you very much for reading my problem.