Jump to content
Sign in to follow this  
E_peace6679

Tolong Aku Jap..huh...bahasa C++

Recommended Posts

#include<stdio.h>

main()

{

/*aturcara ini mengira jumlah bilangan guli jika satu kotak mengandungi 120 biji guli.*/

int nBilGuliSekotak=120;

int nBilGuli,nBilKotak;

printf("Masukkan jumlah kotak yang mengandungi guli:\n";

scanf("%d",&nBilKotak);

nBilGuli=nBilKotak*nBilGuliSekotak;

printf("jumlah bilangan guli adalah:%d",nBilGuli);

printf("biji\n");

return 0;/Atur cara tamat tanpa ralat

}

Ada masalah ke??kat bawah nie errornya... :

--------------------Configuration: test nie - Win32 Debug--------------------

Linking...

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

Debug/test nie.exe : fatal error LNK1120: 1 unresolved externals

Error executing link.exe.

test nie.exe - 2 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites

#include<stdio.h>

main()

{

/*aturcara ini mengira jumlah bilangan guli jika satu kotak mengandungi 120 biji guli.*/

int nBilGuliSekotak=120;

int nBilGuli,nBilKotak;

printf("Masukkan jumlah kotak yang mengandungi guli:\n";

scanf("%d",&nBilKotak);

nBilGuli=nBilKotak*nBilGuliSekotak;

printf("jumlah bilangan guli adalah:%d",nBilGuli);

printf("biji\n");

return 0;/Atur cara tamat tanpa ralat

}

Ada masalah ke??kat bawah nie errornya... :

--------------------Configuration: test nie - Win32 Debug--------------------

Linking...

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

Debug/test nie.exe : fatal error LNK1120: 1 unresolved externals

Error executing link.exe.

test nie.exe - 2 error(s), 0 warning(s)

ni yang betoinyer...



#include<stdio.h>

int main()
{

/*aturcara ini mengira jumlah bilangan guli jika satu kotak mengandungi 120 biji guli.*/

int nBilGuliSekotak=120;
int nBilGuli,nBilKotak;

printf("Masukkan jumlah kotak yang mengandungi guli:\n");<---ko x masuk bracket

scanf("%d",&nBilKotak);

nBilGuli=nBilKotak*nBilGuliSekotak;

printf("jumlah bilangan guli adalah:%d",nBilGuli);
printf("biji\n");

return 0;//Atur cara tamat tanpa ralat<----satu slash x bleh utk comment

}[/codebox]

Share this post


Link to post
Share on other sites

sila guna 'code' instead of 'codebox' sebab forum ni buggy.

apa maksud awak??hehe..sory x paham...

sila guna 'code' instead of 'codebox' sebab forum ni buggy.

apa maksud awak??hehe..sory x paham...

Share this post


Link to post
Share on other sites

Maksud encik pot pet, sila guna code instead of codebox untuk code tagging. Contoh:

1) Ini kalau guna codebox.


int main(void)
{
return 0;
}
[/codebox]

2) Ini kalau guna code.

[code]int main(void) {   return 0; }[/code]

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...