Rabu, 07 Maret 2012

program C++ menampilkan identitas menggunakan proses I/O C++


#include<stdio.h>
#include<iostream.h>
void main ()
{
char        NIM[20],
NAMA[25],
FAKULTAS[20],
JURUSAN[20];
printf("\t      :Ahmad Khamdi Musthofa\n");
printf("\t   LABORATORIUM SIMULASI\n");
printf("\tINSTITUT ADHI TAMA SURABAYA\n");
printf("========================================\n");

cout<<"NIM       :";
cin>>NIM;

printf("NAMA      :");
scanf("%s",&NAMA);

cout<<"FAKULTAS  :";
cin>>FAKULTAS;

cout<<"JURUSAN   :";
cin>>JURUSAN;

printf("========================\n");
printf("IDENTITAS ANDA   :\n");
cout<<"NIM   :";
cout<<NIM<<  '\n';
cout<<"NAMA  :";
cout<<NAMA<<'\n';
printf("=======================\n");
}

Tidak ada komentar:

Posting Komentar