//jimsan unissula
#include<conio.h>
#include<iostream>
using namespace std;
struct mahasiswa{
char nim[15];
char nama[30];
char alamat[50];
};
main(){
mahasiswa mhs;
cout<<"Nama : "; cin>>mhs.nama;
cout<<"Nim : "; cin>>mhs.nim;
cout<<"Alamat : "; cin>>mhs.alamat;
cout<<endl<<endl;
cout<<"Nim Anda : "<<mhs.nim<<endl;
cout<<"Nama Anda : "<<mhs.nama<<endl;
cout<<"Alamat Anda : "<<mhs.alamat<<endl;
getch();
}
//salam informatika
tampilan program setelah dijalankan
note: pada program tersebut saya menggunakan compiler code block
#include<conio.h>
#include<iostream>
using namespace std;
struct mahasiswa{
char nim[15];
char nama[30];
char alamat[50];
};
main(){
mahasiswa mhs;
cout<<"Nama : "; cin>>mhs.nama;
cout<<"Nim : "; cin>>mhs.nim;
cout<<"Alamat : "; cin>>mhs.alamat;
cout<<endl<<endl;
cout<<"Nim Anda : "<<mhs.nim<<endl;
cout<<"Nama Anda : "<<mhs.nama<<endl;
cout<<"Alamat Anda : "<<mhs.alamat<<endl;
getch();
}
//salam informatika
tampilan program setelah dijalankan
No comments:
Post a Comment