# 请解决我的问题

``````#include<iostream.h>
#include<conio.c>

char choice;
int time1;
int time2;
char cnt;
int result;
//**********************************************************
int Power(int time1, int time2)
{
int exponentResult=1;
for(int i=0 ; i<time2 ; i++)
exponentResult=time1 * exponentResult;
return exponentResult;
}
//***************************************************************
void Factorial(int time1, int* factorialResult)
{
*factorialResult=1;
for(int i=time1 ; i>0 ; i--)
*factorialResult=*factorialResult * i;
}
/******************************************************************/
int sum (int time1, int time2)
{
int sum;
sum = time1 + time2;
return sum;
}
/******************************************************************/
int multiply(int time1, int time2)
{
int multy;
multy = time1 * time2;
return multy;
}
/****************************************************/
int main()
{
do
{
cout<<"\n Enter first number: ";
cin>>time1;
cout<<"\n Enter second number: ";
cin>>time2;
cout<<"\n\tEnter S for Sum\n";
cout<<"\tEnter V to find power\n";
cout<<"\tEnter A to Multiply\n";
cout<<"\tEnter F for the factorials\n";
cout<<"\tEnter Q to Quit\n";
cin>>choice;
switch (choice)
{
case 's':
cout<<" Result after addition is : "<<sum(time1, time2)<<endl;
break;
case 'a':
cout<<" Result of Multiply first & second : "<<multiply(time1, time2)<<endl;
break;
case 'v':
cout<<" Result of power integers is : "<<Power(time1,time2)<<endl;
break;
case 'f':
Factorial(time1,&result);
cout<<endl<<"The result of factorail of first number is :     "<<result;
Factorial(time2,&result);
cout<<endl<<"The result of factorail of Second number is :     "<<result;
break;
case 'q':
exit(0);
break;
if(choice == 's' || choice == 'v' || choice == 'a' || choice == 'f' || choice == 'q')

default:
cout<<"\nwrong choice entered\n";
break;
}
cout<<"\nDo you want to continue? Y: ";
cin>>cnt;
}
while(cnt == 'y');
clrscr();
getch();
}``````

• C大调 回复

包括

完成==是

• yut 回复

``````if(choice == 's' || choice == 'v' || choice == 'a' || choice == 'f' || choice == 'q')

default:
cout<<"\nwrong choice entered\n";
break;``````

您想在那里做什么？

顺便说一句，标准的C函数pow（）与

``int Power(int time1, int time2)``

• id_sed 回复

#include #include 无效main（） { int A，S，a，b; long int F = 1； clrscr（）; printf（“输入两个数字”）; scanf（“％d％d”，＆a，＆b）; A = a + b; printf（“ \ nA =％d”，A）; S = a-b； printf（“ \ nS =％d”，S）; 对于（i = 1; i <= a; i ++） { F = F * i; } printf（“ \ n阶乘首数F（a）=％ld”，F）;

对于（i = 1; i <= b; i ++） { F = F * i; } printf（“ \ n第二个数的阶乘F（b）=％ld”，F）; getch（）; }

• 老实人 回复

使用[code] [/ code]标签。

``````#include<conio.c>
``````

->

``````#include<conio.h>
``````