▼ กำลังโหลดข้อมูล... ▼
แสดงความคิดเห็น
คุณสามารถแสดงความคิดเห็นกับกระทู้นี้ได้ด้วยการเข้าสู่ระบบ
กระทู้ที่คุณอาจสนใจ
อยากทำวนหลูบ กับระบบทอนเงินทำอย่างไร?
#include <stdio.h>
#include <conio.h>
void main(){
int movie,Day,Time,seat,price,ticket,name,email;
float total;
printf("MOVIES COMINGSOON \n");
printf(&q
สมาชิกหมายเลข 7121313
ช่วยหนูทำ Flow Chart ให้หน่อยได้มั้ยคะ
#include <stdio.h>
int main(void) {
int a,tri,rec,pen;
int ฐาน,สูง,กว้าง,ยาว;
float ด้าน;
printf("หาพื้นที่สามเ
สมาชิกหมายเลข 7034468
ช่วยผมทำหน่อยครับมันผิดตรงไหน
#include <stdio.h>
int main(void) {
int a;
float ฐาน;
float สูง;
printf("ก คือ หาพื้นที่ของสามเหลี่ยม
สมาชิกหมายเลข 5985608
เติมสกอร์โรเเกรมยังไงคะ
ถ้าเราอยากเติมสกอร์นับเเต้มด้วยควรทำยังไงคะ
#include<stdio.h>
#include<conio.h>
#include<time.h>
#include<stdlib.h>
main()
{
int a=0,com=0;
สมาชิกหมายเลข 5267783
อ่านกระทู้อื่นที่พูดคุยเกี่ยวกับ
C (ภาษาคอมพิวเตอร์)
คอมพิวเตอร์
ช่วยแก้codeในcode blockให้หน่อยค่ะมันรันซ้อนกันอ่ะค่ะทำยังไงดี?
void menu()
{
printf("==========MENU==========\n");
printf("A.Calculate Calorie\n");
printf("B.Calculate Waistline\n");
printf("C.Calculate Weight\n");
printf("D.Exit\n");
printf("Select number : ");
}
void calorie()
{
int many;
int choice;
printf("==========FOOD==========\n");
printf("1.Stewed pork leg on rice\n");
printf("2.Rice porridge with shrimp\n");
printf("3.Rice topped with stir-fried pork and basil\n");
printf("4.Steamed chicken with rice\n");
printf("5.Fried rice with pork\n");
printf("6.Spicy noodle salad\n");
printf("Please choose : ");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("How many : ");
scanf("%d",&many);
printf("1. has %d calories.\n",580*many);
break;
case 2:
printf("How many : ");
scanf("%d",&many);
printf("2. has %d calories.\n",230*many);
break;
case 3:
printf("How many : ");
scanf("%d",&many);
printf("3. has %d calories.\n",370*many);
break;
case 4:
printf("How many : ");
scanf("%d",&many);
printf("4. has %d calories.\n",630*many);
break;
case 5:
printf("How many : ");
scanf("%d",&many);
printf("5. has %d calories.\n",561*many);
break;
case 6:
printf("How many : ");
scanf("%d",&many);
printf("6. has %d calories.\n",135*many);
break;
default:printf("NO CHOICE\n");
}
}
void waistline()
{
float h;
printf("Enter your height(cm): ");
scanf("%f",&h);
printf("Your suitable waistline(in) is %.0f\n",0.393700787*h/2);
}
void weight()
{
float w;
printf("Enter your height(cm) : ");
scanf("%f",&w);
printf("Your suitable weight is %.1f\n",22.9*w*w/10000);
}
int main()
{
char num;
do{
menu();
scanf("%c",&num);
switch(num)
{
case 'A':calorie();
break;
case 'B':waistline();
break;
case 'C':weight();
break;
default : break;
}
}while(num !=4);
}
คือเวลารันสมมติเราเลือกเมนู A พอทำAเสร็จมันจะขึ้นตารางเมนูมา2รอบอ่ะค่ะ เราค้องการให้ขึ้นแค่รอบเดียว ส่วนตัว exit พอกด D มันไม่จบโปรแกรมให้อ่ะค่ะ