Cara Input nama dengan spasi
//input dengan spasi
Selamat pagi, siang, sore, malam para bloggers hehehe
kali ini gue bakal kasih tau cara masukin spasi dalam coding C++
sebelumnya kenapa sih gue bikin post tentang ini??
jujur aja, sebelum bikin ini post dulu gue jengkel bgt setiap bikin nama, alamat, dll
pasti aja kepencet spasi eh malah jadi kacau wakakakak
oleh karena itu disini gue mau kasih source nya,.
inti nya sih coding c++ "cin" diubah jadi "cin.getline"
daripada banyak curhat langsung aja cek nih guys
Source Code: #include <iostream.h>
#include <conio.h>
int main()
{
char nama[20],
nim[20],
alamat[50]; // menentukan jumlah karakter yang diinput
cout<< " Biodata Mahasiswa" <<endl<<endl;
cout<<"Nama = ";
cin.getline(nama, 20);
cout<<"NIM = ";
cin.getline(nim, 20);
cout<<"Alamat = ";
cin.getline(alamat, 35);
cout<<endl;
cout<<"----------------------------------"<<endl<<endl;
cout<<"Nama : "<<nama<<endl;
cout<<"NIM : "<<nim<<endl;
cout<<"Alamat : "<<alamat<<endl;
getch();
}
Hasil pada CMD |
The Casino Roll - Casino Roll
ReplyDeleteCasino Roll. Casino Roll. How 윌리엄 힐 To Play Online. There are 999betasia no rules related to 해외배당 gambling, but 안전토토사이트 rather the players are 7 포커 able to win by their
Harrah's Reno Casino to reopen without paying workers
ReplyDeleteAfter the casinos 구미 출장마사지 closed in February, 김천 출장샵 the Reno Police Department has decided to reopen Harrah's Reno, saying it 울산광역 출장샵 will reopen 용인 출장안마 without May 26, 과천 출장안마 2020 · Uploaded by Reno Gazette