Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ASK] code C++ benar bagaimana?
#1
Wah-yellow_16 
om, tante, mas, mbak dan semuanye dah. ane mau nanya ane bikin program di C++, ane rasa dah bnr tp ada yg error. cuma ga tau error dmnnya, Mentok .

nih codenya:
#include <iostream>
#include <string>

using namespace std;
int main();
{
int A,B;
int hasil;

cout<<"program untuk mencari hasil kali dari 2 buah bilangan"<<endl;
cout<<"input A : ";cin<<A;
cout<<"input B : ";cin<<B;
cout<<endl;

hasil = A*B;
cout<<"hasil : "<<hasil<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}

kira2 salah dmnnya yak? Bingung
mohon bantuannya, Mentok
I JUST WANT TO DO THE BEST THINGS...!!
I JUST WANT TO SEE THE BEST THINGS...!!
I JUST WANT TO LEARN WHAT I SEE AND HEAR...!!
Reply
#2
tanda ; di int main() hapus, cin<< ganti cin>>, trus tambahin library windows.h
Code:
#include <iostream> #include <string> #include <windows.h> using namespace std; int main() { int A,B; int hasil; cout<<"program untuk mencari hasil kali dari 2 buah bilangan"<<endl; cout<<"input A : ";cin>>A; cout<<"input B : ";cin>>B; cout<<endl; hasil = A*B; cout<<"hasil : "<<hasil<<endl; system("PAUSE"); return EXIT_SUCCESS; }
gue homo, thanks Santet
Reply
#3
ane coba copy dlu, Smile .

(04-12-2013, 11:09 PM)RieqyNS13 Wrote: tanda ; di int main() hapus, cin<< ganti cin>>, trus tambahin library windows.h
Code:
#include <iostream> #include <string> #include <windows.h> using namespace std; int main() { int A,B; int hasil; cout<<"program untuk mencari hasil kali dari 2 buah bilangan"<<endl; cout<<"input A : ";cin>>A; cout<<"input B : ";cin>>B; cout<<endl; hasil = A*B; cout<<"hasil : "<<hasil<<endl; system("PAUSE"); return EXIT_SUCCESS; }

ahaayy, bisaaaaa. >< . tinggal coba bikin yg lain dah. Love
arigatooooo, Cheer .
I JUST WANT TO DO THE BEST THINGS...!!
I JUST WANT TO SEE THE BEST THINGS...!!
I JUST WANT TO LEARN WHAT I SEE AND HEAR...!!
Reply
#4
klo sdh bs bkn yg lain, di share yo... :D
[Image: 2nisf0x.jpg]

don't called yourself a hacker if you can't do programming!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SHARE Source Code Spyware Keylogger dgn C++ Mbah Roni 2 72 03-07-2014, 04:18 PM
Last Post: Mbah Roni
  Source Code Kriptografi (Vigenere Chiper) C++ Ryanz San Rakagi 3 119 10-27-2013, 08:54 PM
Last Post: Bung Ali
  [ASK] Penjelasan code program ini m3d1c1n3 9 90 10-27-2013, 06:51 PM
Last Post: m3d1c1n3

Forum Jump:


Users browsing this thread: 1 Guest(s)