Home

ใครเก่งภาษา C++ ช่วยหน่อยครับ

คุยเรื่องเพลง หนังสือ ภาพยนตร์ และเรื่องอื่นๆ ทั่วไป

ใครเก่งภาษา C++ ช่วยหน่อยครับ

โพสต์โดย CR7Ronaldo » พุธ ต.ค. 08, 2008 23:24

คือ อาจารย์ให้ทำ โปรเจ็คส่ง

มีใครเก่งพอจะเขียนเป็นมั้ยครับ

แบบเครื่องคิดเลข หรือเกมส์ไรก็ได้อ่ะครับ

ใครเก่งช่วยทีนะครับ ปกติที่ ม.ใช้ Turbo C++ 3

ใครเทพๆเก่งๆ ช่วยทีนะครับหรือมีลิงค์ให้ศึกษาก็ได้ครับ หา นานมากๆ ยังไมได้ไรเลย

ขอบคุณ
- Manchester United -

รูปภาพรูปภาพ
CR7Ronaldo
ทดสอบฝีเท้า
ทดสอบฝีเท้า
 
โพสต์: 91
ลงทะเบียนเมื่อ: อาทิตย์ ก.ย. 07, 2008 19:19

โพสต์โดย แมนยูอยู่ในสายเลือด » พุธ ต.ค. 08, 2008 23:40

ผมก่อเรียนนะเทร์มที่ผ่านมานี้เอง สอบไปเมื่อวันจันที่ผ่านมาด้วย
ขอบอกเลย ยากมากเลยอ่ะ ทำไม่เป็น
รูปภาพ
แมนยูอยู่ในสายเลือด
ผู้เล่นชุดใหญ่
ผู้เล่นชุดใหญ่
 
โพสต์: 819
ลงทะเบียนเมื่อ: เสาร์ ต.ค. 27, 2007 14:52
ที่อยู่: ลำปางหนา

โพสต์โดย manutd_girl_w » พุธ ต.ค. 08, 2008 23:49

มีเครื่องคิดเลขแต่ใช้vbค่ะเพื่อนเคยส่งมาให้

c++นี่เขียนไม่ค่อยเป็นเลย
ยากมากค่ะ
manutd_girl_w
สต๊าฟโค้ช
สต๊าฟโค้ช
 
โพสต์: 6619
ลงทะเบียนเมื่อ: อังคาร ก.ย. 23, 2008 11:29

โพสต์โดย CR7Ronaldo » พุธ ต.ค. 08, 2008 23:57

งานเข้าแว้วววววว ฮือๆๆๆ

พระเจ้า อาเมน ช่วยลูกด้วย
- Manchester United -

รูปภาพรูปภาพ
CR7Ronaldo
ทดสอบฝีเท้า
ทดสอบฝีเท้า
 
โพสต์: 91
ลงทะเบียนเมื่อ: อาทิตย์ ก.ย. 07, 2008 19:19

โพสต์โดย CR7Ronaldo » พฤหัสฯ. ต.ค. 09, 2008 00:08

#include"stdio.h"
#include"conio.h"
#include"dos.h"
#include"stdlib.h"
#include"string.h"

void DISPNUM(char *);
void main()
{
clrscr();

_setcursortype(0);
gotoxy(30,19);
textcolor(GREEN+BLINK);
cprintf("SIMPLE CALCULATOR");
gotoxy(50,21);
textcolor(BLUE+BLINK);
cprintf("By Rakesh Juyal");
getch();
// clrscr();

int x=30,y=10;

textcolor(WHITE);
gotoxy(x,y);
cprintf("7 8 9");
gotoxy(x,y+2);
cprintf("4 5 6");
gotoxy(x,y+4);
cprintf("1 2 3");
gotoxy(x,y+6);
cprintf("0");

textcolor(RED);
gotoxy(x+5,y+6);
cprintf(". =");


textcolor(GREEN);
x=x+15;
gotoxy(x,y);
cprintf("/");

gotoxy(x,y+2);
cprintf("*");

gotoxy(x,y+4);
cprintf("-");

gotoxy(x,y+6);
cprintf("+");

//Draw The For Calc//
x=28;y=5;
gotoxy(x,y);

textcolor(WHITE);

// ? & ? //
cprintf("%c",218);
gotoxy(28+20,y);
cprintf("%c",191);
// ? & ? //

//Horiz. Boundary
for(x=29;x<=28+19;x++)
{
gotoxy(x,y);
cprintf("%c",196);
gotoxy(x,y+12);
cprintf("%c",196);
}
//End of Horiz. Bound

// ? & ? //
cprintf("%c",217);
x=28;y=y+12;
gotoxy(x,y);
cprintf("%c",192);
//End of ? & ? //

//Vertic. Bound.

for(y=6;y<=16;y++)
{
gotoxy(x,y);
cprintf("%c",179);
gotoxy(x+20,y);
cprintf("%c",179);
}
//End of Vertic Bou.

y=6;

for(x=30;x<30>=200;i=i-50)
{
sound(i);
delay(100);
}
nosound();
break;
}

//Numeric//
if((ch>='0')&&(ch<='9'))
{
if(i<MAX)
{
if(first=='y')
{
operand1[i]=ch;
DISPNUM(operand1);
i++;
}
else
{
operand2[i]=ch;
DISPNUM(operand2);
i++;
}
}
else //More than 8 digit
{
ERROR=1;
}
}
else if(ch=='.')
{
if(first=='y')
{
if(strchr(operand1,'.')==NULL)
{
operand1[i]=ch;
i++;
}
DISPNUM(operand1);
}
else
{
if(strchr(operand2,'.')==NULL)
{
operand2[i]=ch;
i++;
}
DISPNUM(operand2);
}
}
//Non Numeric
else if (ch=='*')
{
operator1='*';
first='n';
i=0;
}
else if (ch=='/')
{
operator1='/';
first='n';
i=0;
}
else if (ch=='+')
{
operator1='+';
first='n';
i=0;
}
else if (ch=='-')
{
operator1='-';
first='n';
i=0;
}
else if ((ch=='=')||(ch=='
'))
{
//Store in Floating
if(strcmpi(operand1,BLANK)!=0)
{
num1=_atold(operand1);
}
if(strcmpi(operand2,BLANK)!=0)
{
num2=_atold(operand2);
}
//Now Calculate
switch (operator1)
{
case '+':
num1=num1+num2;
break;
case '-':
num1=num1-num2;
break;
case '*':
num1=num1*num2;
break;
case '/':
num1=num1/num2;
break;
}
//ltoa(num1,operand1,10);
gcvt(num1,12,operand1);
DISPNUM(operand1);
i=0;
first='y';

strcpy(operand1,BLANK);
strcpy(operand2,BLANK);
}
else //Invalid Choice
{
ERROR=1;
}

//Beep On ERROR else ------ //
if (ERROR==0)
{
sound(920);
}
else
{
sound(100);
ERROR=0;
}
delay(250);
nosound();

gotoxy(1,1);
cprintf("%d",i);

}while(1);


// clrscr();
gotoxy(30,19);
textcolor(GREEN+BLINK);
cprintf("SIMPLE CALCULATOR");
gotoxy(50,21);
textcolor(BLUE+BLINK);
cprintf("By Rakesh Juyal");
// getch();
}
void DISPNUM(char *num)
{
textbackground(RED);
gotoxy(31,7);
cprintf(" ");
gotoxy(31,7);
cprintf("%s",num);
}


ผมรันแล้วมันเออเร่ออ่ะครับ ใครรู้บ้างครับมันผิดยังไง

ตั้ง 6 ที่อ่ะครับ ฮือๆ ช่วยหน่อยน๊า
- Manchester United -

รูปภาพรูปภาพ
CR7Ronaldo
ทดสอบฝีเท้า
ทดสอบฝีเท้า
 
โพสต์: 91
ลงทะเบียนเมื่อ: อาทิตย์ ก.ย. 07, 2008 19:19

โพสต์โดย Crezendo » พฤหัสฯ. ต.ค. 09, 2008 00:19

CR7Ronaldo เขียน:#include"stdio.h"
#include"conio.h"
#include"dos.h"
#include"stdlib.h"
#include"string.h"

void DISPNUM(char *);
void main()
{
clrscr();

_setcursortype(0);
gotoxy(30,19);
textcolor(GREEN+BLINK);
cprintf("SIMPLE CALCULATOR");
gotoxy(50,21);
textcolor(BLUE+BLINK);
cprintf("By Rakesh Juyal");
getch();
// clrscr();

int x=30,y=10;

textcolor(WHITE);
gotoxy(x,y);
cprintf("7 8 9");
gotoxy(x,y+2);
cprintf("4 5 6");
gotoxy(x,y+4);
cprintf("1 2 3");
gotoxy(x,y+6);
cprintf("0");

textcolor(RED);
gotoxy(x+5,y+6);
cprintf(". =");


textcolor(GREEN);
x=x+15;
gotoxy(x,y);
cprintf("/");

gotoxy(x,y+2);
cprintf("*");

gotoxy(x,y+4);
cprintf("-");

gotoxy(x,y+6);
cprintf("+");

//Draw The For Calc//
x=28;y=5;
gotoxy(x,y);

textcolor(WHITE);

// ? & ? //
cprintf("%c",218);
gotoxy(28+20,y);
cprintf("%c",191);
// ? & ? //

//Horiz. Boundary
for(x=29;x<=28+19;x++)
{
gotoxy(x,y);
cprintf("%c",196);
gotoxy(x,y+12);
cprintf("%c",196);
}
//End of Horiz. Bound

// ? & ? //
cprintf("%c",217);
x=28;y=y+12;
gotoxy(x,y);
cprintf("%c",192);
//End of ? & ? //

//Vertic. Bound.

for(y=6;y<=16;y++)
{
gotoxy(x,y);
cprintf("%c",179);
gotoxy(x+20,y);
cprintf("%c",179);
}
//End of Vertic Bou.

y=6;

for(x=30;x<30>=200;i=i-50)
{
sound(i);
delay(100);
}
nosound();
break;
}

//Numeric//
if((ch>='0')&&(ch<='9'))
{
if(i<MAX)
{
if(first=='y')
{
operand1[i]=ch;
DISPNUM(operand1);
i++;
}
else
{
operand2[i]=ch;
DISPNUM(operand2);
i++;
}
}
else //More than 8 digit
{
ERROR=1;
}
}
else if(ch=='.')
{
if(first=='y')
{
if(strchr(operand1,'.')==NULL)
{
operand1[i]=ch;
i++;
}
DISPNUM(operand1);
}
else
{
if(strchr(operand2,'.')==NULL)
{
operand2[i]=ch;
i++;
}
DISPNUM(operand2);
}
}
//Non Numeric
else if (ch=='*')
{
operator1='*';
first='n';
i=0;
}
else if (ch=='/')
{
operator1='/';
first='n';
i=0;
}
else if (ch=='+')
{
operator1='+';
first='n';
i=0;
}
else if (ch=='-')
{
operator1='-';
first='n';
i=0;
}
else if ((ch=='=')||(ch=='
'))
{
//Store in Floating
if(strcmpi(operand1,BLANK)!=0)
{
num1=_atold(operand1);
}
if(strcmpi(operand2,BLANK)!=0)
{
num2=_atold(operand2);
}
//Now Calculate
switch (operator1)
{
case '+':
num1=num1+num2;
break;
case '-':
num1=num1-num2;
break;
case '*':
num1=num1*num2;
break;
case '/':
num1=num1/num2;
break;
}
//ltoa(num1,operand1,10);
gcvt(num1,12,operand1);
DISPNUM(operand1);
i=0;
first='y';

strcpy(operand1,BLANK);
strcpy(operand2,BLANK);
}
else //Invalid Choice
{
ERROR=1;
}

//Beep On ERROR else ------ //
if (ERROR==0)
{
sound(920);
}
else
{
sound(100);
ERROR=0;
}
delay(250);
nosound();

gotoxy(1,1);
cprintf("%d",i);

}while(1);


// clrscr();
gotoxy(30,19);
textcolor(GREEN+BLINK);
cprintf("SIMPLE CALCULATOR");
gotoxy(50,21);
textcolor(BLUE+BLINK);
cprintf("By Rakesh Juyal");
// getch();
}
void DISPNUM(char *num)
{
textbackground(RED);
gotoxy(31,7);
cprintf(" ");
gotoxy(31,7);
cprintf("%s",num);
}


ผมรันแล้วมันเออเร่ออ่ะครับ ใครรู้บ้างครับมันผิดยังไง

ตั้ง 6 ที่อ่ะครับ ฮือๆ ช่วยหน่อยน๊า
มันยากจริง ผมซิ่วไปแหละ ของเค้าแรงC++
Crezendo
ผู้เล่นสำรอง
ผู้เล่นสำรอง
 
โพสต์: 347
ลงทะเบียนเมื่อ: ศุกร์ เม.ย. 04, 2008 23:03

โพสต์โดย dracura » พฤหัสฯ. ต.ค. 09, 2008 00:34

ส่งมะไหรอ่ะ
ทำไมถึงลกๆๆ ทำจังเลยคับ ....

ครื่อว่าผมจบมานานแล้ว จำคำสั่งมะค่อยได้ แต่ วิธีคิด อังกอ มันฝังอยู่ในหัว แต่รูปแบบคำสั่ง นี่จำมะค่อยได้อ่ะ
แต่ที่เขียนอ่ะคับ ทำไมเขียนแบบไฟล์เดียวให้รวบรัดเส็รจอ่ะคับ
ไม่แยกเปงไฟล์ๆๆอ่ะ จำคำสั่งมะได้แหะ แบบที่เขียนคำสั่งย่อยๆๆไว้ก่อนหลายๆๆคำสั่ง
แล้วค่อยใช้ทีละคำสั่งอ่ะ

อธิบายมะค่อยเปงสะด้วย ภาษา C นี่ถ้าไม่ทำความเข้าใจแต่แรกนี่ ลำบาก เรียนไงก็มะรู้เรื่องหรอก

ปล. ตอนเรียน มะเคยตกเลยสักครั้ง ได้คะแนนติด1-5 ของห้องตลอด ... ตอนเรียน ผ่านมะถึง10 นอกนั้นตกหมด ..

แต่จบมา2-3ปีมะเคยได้ใช้เลยสักนิด เหอๆๆๆ

ลองทิ้งเมลไว้สิมะแน่ อาจช่วยแนะนำได้ แต่จำคำสั่งมะค่อยได้จิงๆๆๆนะ แต่จะพยายามอธิบาย วิธีคิดให้ละกัน อาจพอช่วยได้....
dracura
ทดสอบฝีเท้า
ทดสอบฝีเท้า
 
โพสต์: 64
ลงทะเบียนเมื่อ: อังคาร พ.ย. 08, 2005 04:45
ที่อยู่: 100

โพสต์โดย CR7Ronaldo » พฤหัสฯ. ต.ค. 09, 2008 00:52

ส่งอาจารย์ไปแล้วครับ ทาง Mail ผิดถูกเช่นไรแล้วแต่อาจารย์จะกรุณา อิอิ

5555+ ส่งปุ๊บ จารย์ Mail กลับมาเลย แหม๋ให้ส่งตั้งหลายวัน ไม่ส่ง

แล้วส่งช้ามากๆเลยนะ
- Manchester United -

รูปภาพรูปภาพ
CR7Ronaldo
ทดสอบฝีเท้า
ทดสอบฝีเท้า
 
โพสต์: 91
ลงทะเบียนเมื่อ: อาทิตย์ ก.ย. 07, 2008 19:19

โพสต์โดย Mr.SenGz » พฤหัสฯ. ต.ค. 09, 2008 09:00

เพิ่งเรียนไปเอง..

แต่อยากบอกว่า

ลอกเพื่อนอย่างเดียว!

มันยากจริงๆ

%d - %.2f

งงเลย..
The Gentle Midfielder
รูปภาพ
I'm Not Hiso, I'm Loso..
ภาพประจำตัวสมาชิก
Mr.SenGz
สุดยอดระดับโลก
สุดยอดระดับโลก
 
โพสต์: 5491
ลงทะเบียนเมื่อ: พุธ ก.ย. 26, 2007 17:00
ที่อยู่: -[P&P Resort]-

โพสต์โดย Grean_Size » พฤหัสฯ. ต.ค. 09, 2008 12:05

ผมฟาด F มาเรียบร้อยแล้วครับ หึหึ
รั ก ส ง บ . . . ร บ ไ ม่ ข ล า ด
รูปภาพ
Grean_Size
ผู้เล่นชุดใหญ่
ผู้เล่นชุดใหญ่
 
โพสต์: 760
ลงทะเบียนเมื่อ: อาทิตย์ มี.ค. 16, 2008 02:37
ที่อยู่: http://eboling2u.hi5.com จิงๆนะเนี่ย

โพสต์โดย mmmutd18 » อังคาร ต.ค. 14, 2008 01:12

ยากมากภาษาซี
รูปภาพ
[URL=http://g.imageshack.us/g.php?h=80&i=ps18tf01ix5.jpg][IMG]
mmmutd18
ผู้เล่นชุดใหญ่
ผู้เล่นชุดใหญ่
 
โพสต์: 913
ลงทะเบียนเมื่อ: อังคาร มี.ค. 18, 2008 14:16
ที่อยู่: msu


ย้อนกลับไปยัง สัพเพเหระ

ผู้ใช้งานขณะนี้

่กำลังดูบอร์ดนี้: AhrefsBot และ บุคคลทั่วไป 1 ท่าน




PG88   bj88   SHBET   trực tiếp bóng đá   QQ88   7m   https://ok9.show/   https://ok9.ninja/   King88   trực tiếp bóng đá   F168   https://789bet.rocks/   MB66   78Win   78win   789WIN   MB66   ev88   s666   8day   v9bet   bk8   hitclub   go88   MB66   link kubet   SHBET   https://shbet.cruises/   F8BET   https://789win1.black/   sun win   keonhacai   Hitclub   Hi88   cm88vn.com   https://f8bet.science/   F168   789club   Chokbet   33win   33win   hello88   s666   MB66   789BET   lương sơn tv   https://vnew88.net/   78win   https://bshbet.com/   S666   Jun88   Kubet   Mb66   79king   789win   SHBET   https://hi88.tours/   F168   luongsontv   F8bet   https://xx88.ac/   8day   789club   789club   sunwin   I9BET   TYPHU88   EV88   F8BET   F168   78win   OK8386   mmlive   SHBET   SHBET   https://789winh.com/   f168   SC88   xoilac   SHBET   ufabet   b52club   hitclub   RR88   ricbet   ricbet   K8CC   https://qq88gg.net/   Jun88   https://f8betlv.com/   F168   QQ88   ok9   zbet   https://mm88.directory/   https://789bets.biz/   hi88   MB66   jun88   8KBET   MM88   XX88   MM88   OK9   https://f168.onl/   https://mb66ac.com/   Fun88   188bet   W88   Fun88   kèo nhà cái   F8bet   new88   https://go888.in.net/   7m   hitclub   188 bet   j88   vaobet   go88   MB66   สล็อต   sunwin   sunwin   ku bet   SHBET   hi88com   bomwin   SC88   Nổ hũ   789BET   CM88   CM88   MB66   XX88   9r   https://cakhiatv.uno/   lương sơn tv   https://qq88.money/   32win   https://rr88.black/   kqbd   hitclub   NEW88   SHBET   สล็อตเว็บตรง   pgslot   ดูบอลสด   ufabet   สล็อตเว็บตรง   สล็อตเว็บตรง   สล็อตเว็บตรง   สล็อตเว็บตรง   สล็อตเว็บตรง   เว็บสล็อต   บอลสด   สล็อต   สล็อต   เว็บแทงบอลUFABET by Taladball   mb66   nowgoal   https://keonhacai.deals/   NEW88   KQBD   Ricbet   go88   iwin   iwin   rikvip   rikvip   แทงบอล UFBET   sc 88   MB66   https://f8bet.me/   FLY88   789BET   trang cá cược bóng đá   100vip   78win   Bomwin   shbet   FLY88   go88   nhà cái uy tín   kqbd 7mcn   MB66   https://fly88.deal/   Fun88 ทางเข้า   JBO   Hitclub   OK9   hi88   topbet   Rik vip   789club   789club   sunwin   Socolive   Cakhiatv   ok9   b52   OK9   Sunwin   sunwin   Game bài đổi thưởng   qh88   BK8   789BET   trang chủ qq88   FLY88   789club   luongsontv   https://xx88.center/   789bet   fly88   789BET   78win   https://789bet.agency/   https://fun88.supply/   hit club   MM88   JL69   f168   GK88   w88   https://rik88.ltd/   F168   Bet88   PG88   แทงบอล   เว็บหวยออนไลน์   7m   Nhà cái uy tín   Kèo nhà cái   Bin88   78Win   F168   C168   MB66   https://fun88.support/   go88   go88   jbo   https://ok8386.finance/   https://f8bet.ventures/