#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
char nama[30];
cout<<"Masukan Nama Anda : ";
cin>>nama;
char nim[10];
cout<<"Masukan Nim Anda : ";
cin>>nim;
char kelas[2];
cout<<"Masukan Kelas Anda : ";
cin>>kelas;
cout<<endl;
cout<<nama<<endl;
cout<<nim<<endl;
cout<<kelas<<endl;
cout<<endl;
cout<<"Selamat Mencoba Bro !!!";
cout<<"\n\n";
system("PAUSE");
return EXIT_SUCCESS;
}
Penjelasan :
- #include#includeusing namespace std;
ketiga code diatas ini merupakan Librari dari Dev C++ - int main(int argc, char *argv[]){//listing code c++}merupakan fungsi utama dari program
- char nama[30]; // pendeklarasian variabel nama sebagai string sebanyak 30 karakter
- char nim[10]; // pendeklarasian variabel nim sebagai string sebanyak 10 karakter
- char kelas[2]; // pendeklarasian variabel kelas sebagai string sebanyak 2 karakter
- cout<<”masukan nama anda :”; //menampilkan pada layar dengan tulisan “masukan nama anda” (tanpa tanda petik).
- cin>>nama; //meminta memasukan nama berupa karakter
- cout<<endl; //pindah baris
- cout<<"Selamat Mencoba Bro !!!"; // menampilkan kalimat Selamat Mencoba Bro !!!
- system(“PAUSE”);return EXIT_SUCCESS; // maksutnya apabila anda menehan enter maka program hasil kopile anda akan terclose secara otomatis Jika anda mengkompile atau meRUN aplikasi code ini hasilnya akan seperti berikut :
Makasih Mas Bro
thanks broo,, sangat bermanfaat bagi pemula
BalasHapusDo you realize there is a 12 word phrase you can communicate to your partner... that will induce deep emotions of love and instinctual appeal to you deep inside his heart?
BalasHapusBecause hidden in these 12 words is a "secret signal" that fuels a man's impulse to love, please and guard you with his entire heart...
12 Words Who Fuel A Man's Desire Response
This impulse is so hardwired into a man's genetics that it will drive him to try harder than ever before to make your relationship as strong as it can be.
Matter-of-fact, triggering this influential impulse is so essential to getting the best ever relationship with your man that the moment you send your man one of the "Secret Signals"...
...You'll soon find him expose his mind and soul to you in a way he haven't experienced before and he will distinguish you as the only woman in the world who has ever truly fascinated him.