急急急 求大哥 要挂科了 还没过关的同学,把程序改成只能运行三次计算就自动退出程序,录制操作视频,视频中讲解你的修改程序的方法,私发给我。 #include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main ()
{
int m;
printf("\n\n\n\n ****************************************\n");
printf(" *** 面积计算 ***\n");
printf(" *** 作者:文卓宇 ***\n");
printf(" ****************************************\n\n\n");
printf("\n **** 按任意键继续 ****\n\n");
getch();
system("cls"); /* 清屏 */
while(1)
{
printf("\n\n\n *************主菜单*********** \n");
printf("\n ********************************************\n");
printf("\n\t 1.三角形面积 ");
printf("\t 2.矩形面积 *\n");
printf("\n\t 3.平行四边形面积 ");
printf("\t 4.梯形面积 *\n");
printf("\n\t 5.圆面积 ");
printf("\t 6.退出程序 *\n");
printf("\n ********************************************\n");
printf("\n\n\t请选择序号(1~6),然后回车:");
scanf("%d",&m);
switch(m)
{
float a,b,h,r,s;
case 1: printf("请输入底和高: \n");
scanf("%f%f", &a,&h);
s=a*h*0.5;
printf("三角形面积为:%.2f\n",s)
#include<conio.h>
#include<stdlib.h>
void main ()
{
int m;
printf("\n\n\n\n ****************************************\n");
printf(" *** 面积计算 ***\n");
printf(" *** 作者:文卓宇 ***\n");
printf(" ****************************************\n\n\n");
printf("\n **** 按任意键继续 ****\n\n");
getch();
system("cls"); /* 清屏 */
while(1)
{
printf("\n\n\n *************主菜单*********** \n");
printf("\n ********************************************\n");
printf("\n\t 1.三角形面积 ");
printf("\t 2.矩形面积 *\n");
printf("\n\t 3.平行四边形面积 ");
printf("\t 4.梯形面积 *\n");
printf("\n\t 5.圆面积 ");
printf("\t 6.退出程序 *\n");
printf("\n ********************************************\n");
printf("\n\n\t请选择序号(1~6),然后回车:");
scanf("%d",&m);
switch(m)
{
float a,b,h,r,s;
case 1: printf("请输入底和高: \n");
scanf("%f%f", &a,&h);
s=a*h*0.5;
printf("三角形面积为:%.2f\n",s)