การบ้าน ภาษา c++ ของลูกสาว ม.5

กระทู้คำถาม
พอดีผมไม่มีความรู้ด้านนี้ ไม่ทราบว่าลูกสาวผมทำถูกเปล่าครับ

#include <stdio.h>
#include <conio.h>
main()
{
int num1;
int num2;
int result,command;
printf("\nEnter Number1");
scanf("%d",&num1);
printf("\nEnter Number2");
scanf("%d",&num2)
printf("\n1.Plus");printf
("\n2.Minus");
printf("\n3.Multiplied");
printf("\n1.Plus");
printf("\n4.Divided");
printf("\n5.Modulo");
printf("\nSelect your command");
scanf("%d",&select);

do{
(startstop==1);

if(select==1)
result=num1+num2;
else if(select==2)
result=num1-num2;
else if(select==3)
result=num1*num2;
else if(select==4)
result=num1/num2;
else if(select==5)
result=num1%num2;
else
{
}
if (command==1)
printf("Your command is 1.Plus = %d" ,result);  
else if (command==2)
printf("Your command is 2.Minus = %d" ,result);
else if (command==3)
printf("Your command is 3.Multiplied = %d" ,result);
else if (command==4)
printf("Your command is 4.Divided = %d" ,result);
else if (command==5)
printf("Your command is 5.Modulo = %d" ,result);
}while(startstop==2);
getch();

}
แสดงความคิดเห็น
โปรดศึกษาและยอมรับนโยบายข้อมูลส่วนบุคคลก่อนเริ่มใช้งาน อ่านเพิ่มเติมได้ที่นี่