| | |
plzz solve my problem
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2005
Posts: 1
Reputation:
Solved Threads: 0
Hye........
plzzz solve my problem my problem is that in this progamme
is runing but i dont understand that how in the end of the programme there is some thinds are missing that are
when programme finished then it print the
Thanks for using the program.
and this progamme is runinig in this way
for example
The program should also have a menu like.
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option:
The program should repeat until the user wants to quit.
Sample Output
Please enter the first number: 11
Please enter the second number: 3
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option: A
The Result after Addition is: 14
Do you want to continue? Y
//After clearing the text window
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option: S
The Result after Subtraction is: 8
Do you want to continue? Y
//After clearing the text window
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option: P
The Result after taking Power is: 1331
Do you want to continue? Y
//After clearing the text window
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option: Q
Thanks for using the program.
but that i have make it but there is many problems
plzzzzzzzz can u help me in this problem
BYE take crae
bye
THE ORGRAMME IS
plzzz solve my problem my problem is that in this progamme
is runing but i dont understand that how in the end of the programme there is some thinds are missing that are
when programme finished then it print the
Thanks for using the program.
and this progamme is runinig in this way
for example
The program should also have a menu like.
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option:
The program should repeat until the user wants to quit.
Sample Output
Please enter the first number: 11
Please enter the second number: 3
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option: A
The Result after Addition is: 14
Do you want to continue? Y
//After clearing the text window
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option: S
The Result after Subtraction is: 8
Do you want to continue? Y
//After clearing the text window
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option: P
The Result after taking Power is: 1331
Do you want to continue? Y
//After clearing the text window
Addition : A
Subtraction : S
Power : P
Factorial : F
Quit : Q
Please enter the option: Q
Thanks for using the program.
but that i have make it but there is many problems
plzzzzzzzz can u help me in this problem
BYE take crae
bye
THE ORGRAMME IS
c Syntax (Toggle Plain Text)
#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"; cout<<"\n\tPlease enter the option: "; 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(); }
Last edited by Ancient Dragon; Feb 11th, 2009 at 3:20 pm. Reason: add code tags
Use [code] [/code] tags.
->
#include<conio.c>#include<conio.h> dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
C++ Syntax (Toggle Plain Text)
if(choice == 's' || choice == 'v' || choice == 'a' || choice == 'f' || choice == 'q') default: cout<<"\nwrong choice entered\n"; break;
BTW, the standard C function pow() is pretty much the same as
C++ Syntax (Toggle Plain Text)
int Power(int time1, int time2)
dwk
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
Seek and ye shall find.
"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.
"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison
"The only real mistake is the one from which we learn nothing."
-- John Powell
•
•
Join Date: Feb 2009
Posts: 1
Reputation:
Solved Threads: 0
#include<stdio.h>
#include<conio.h>
void main()
{
int A,S,a,b;
long int F=1;
clrscr();
printf("enter two number");
scanf("%d%d",&a,&b);
A=a+b;
printf("\nA=%d",A);
S=a-b;
printf("\nS=%d",S);
for(i=1;i<=a;i++)
{
F=F*i;
}
printf("\nthe factorial first number F(a)=%ld",F);
for(i=1;i<=b;i++)
{
F=F*i;
}
printf("\nthe factorial of second number F(b)=%ld",F);
getch();
}
#include<conio.h>
void main()
{
int A,S,a,b;
long int F=1;
clrscr();
printf("enter two number");
scanf("%d%d",&a,&b);
A=a+b;
printf("\nA=%d",A);
S=a-b;
printf("\nS=%d",S);
for(i=1;i<=a;i++)
{
F=F*i;
}
printf("\nthe factorial first number F(a)=%ld",F);
for(i=1;i<=b;i++)
{
F=F*i;
}
printf("\nthe factorial of second number F(b)=%ld",F);
getch();
}
![]() |
Similar Threads
- tell me how to solve "counting Problem" in a BTree ? (C++)
- can solve this problem? (C)
- please anybody help to solve keydown event for enter button problem (HTML and CSS)
- Please anybody help to solve error "class not registered" problem in vs 2003 (ASP.NET)
- Anyway can help me to solve this problem??? (C++)
- CDBException can't solve problem (ASP.NET)
- please help been at my pc for hours still cannot solve problem (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: Little help with creating a C++ password function
- Next Thread: overloading operators
| Thread Tools | Search this Thread |
api array based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





