Click here to Skip to main content
11,641,971 members (65,250 online)

C / C++ / MFC

 
AnswerRe: reading cell value from excel through C++ Pin
_AnsHUMAN_ 19-Feb-13 3:04
group_AnsHUMAN_ 19-Feb-13 3:04 
Generalconvert the code VB6 to VC++ 6. Pin
ASEM.NET17-Feb-13 7:38
memberASEM.NET17-Feb-13 7:38 
GeneralRe: convert the code VB6 to VC++ 6. Pin
DavidCrow17-Feb-13 12:17
memberDavidCrow17-Feb-13 12:17 
QuestionWinHttpClient code Pin
el_tel17-Feb-13 1:21
memberel_tel17-Feb-13 1:21 
AnswerRe: WinHttpClient code Pin
Richard MacCutchan17-Feb-13 2:41
mvpRichard MacCutchan17-Feb-13 2:41 
GeneralRe: WinHttpClient code Pin
el_tel17-Feb-13 2:43
memberel_tel17-Feb-13 2:43 
QuestionCSplitter and CTabCtrl - looking for ideas Pin
Vaclav_Sal16-Feb-13 5:53
memberVaclav_Sal16-Feb-13 5:53 
Questioncalculator Pin
abhi sharma15-Feb-13 21:45
memberabhi sharma15-Feb-13 21:45 
// My first calculator//Abhi's calculator//
#include

using namespace std;

float division (float a, float b)
{
float a1;
a1=a/b;
return (a1);
}
float multiplication (float c, float d)
{
int a2;
a2=c*d;
return (a2);
}
float addition(float e, float f)
{
int a3;
a3=e+f;
return(a3);
}
float subtraction(float g, float h)
{
int a4;
a4=g-h;
return(a4);
}
int main()
{
char user;
float ab;
float da;
float ans;

cout<<endl<<"Welcome to Abhi's Calculator!"<<endl<<endl;
cout<<"(D) = Division(%)"<<endl;
cout<<"(M) = Multiplication(*)"<<endl;
cout<<"(A) = Addition(+)"<<endl;
cout<<"(S) = Subtraction(-)"<<endl<<endl;

cout<<"If you want Division then press D or d ->"<<endl;
cout<<"If you want Multiplication then press M or m ->"<<endl;
cout<<"If you want Additionthen then press A or a ->"<<endl;
cout<<"If you want Subtration then press S or s ->"<<endl<<endl;

cout<<"choose any one ->"<<endl<<endl;
cin>>user;

if (user == 'D' || user == 'd')
{
cout<<endl<<endl<<"What two numbers would you like to divide ->"<<endl<<endl;
cout<<"Enter 1st number ->"<<endl;
cin>>ab;
cout<<"Enter 2nd number ->"<<endl;
cin>>da;
ans = division (ab,da);
cout<<"Answer is -> "<<ans;
}

if (user == 'M' || user == 'm')
{
cout<<endl<<endl<<"What two numbers would you like to multiply ->"<<endl<<endl;
cout<<"Enter 1st number ->"<<endl;
cin>>ab;
cout<<"Enter 2nd number ->"<<endl;
cin>>da;
ans = multiplication (ab,da);
cout<<"Answer is -> "<<ans;
}

if (user == 'A' || user == 'a')
{
cout<<endl<<endl<<"What two numbers would you like to add ->"<<endl<<endl;
cout<<"Enter 1st number ->"<<endl;
cin>>ab;
cout<<"Enter 2nd number ->"<<endl;
cin>>da;
ans = addition (ab,da);
cout<<"Answer is -> "<<ans;
}

if(user == 'S' || user == 's')
{
cout<<endl<<endl<<"What two numbers would you like to subtract ->"<<endl<<endl;
cout<<"Enter 1st number ->"<<endl;
cin>>ab;
cout<<"Enter 2nd number ->"<<endl;
cin>>da;
ans = subtraction (ab,da);
cout<<"Answer is -> "<<ans;
}
cout<<endl<<"Do you want to continue"<<endl<<endl;
{

char a;
cout<<"yes ! -> press Y or y for yes"<<endl<<endl;
cout<<"no ! -> press N or n for no"<<endl<<endl;
cin>>a;

if(a=='y' || a=='Y')
{

main();
}

else if(a=='N' || a=='n')
{
cout<<endl<<"Press any key for stop a program"<<endl;
}
else
{
cout<<endl<<"@ ERROR!"<<endl<<"PLESE CHECK YOUR INPUT"<<endl;
}

}

}
AnswerRe: calculator Pin
Jibesh15-Feb-13 22:03
memberJibesh15-Feb-13 22:03 
AnswerRe: calculator Pin
ProgramFOX17-Feb-13 4:42
member ProgramFOX17-Feb-13 4:42 
AnswerRe: calculator Pin
庄伟东17-Feb-13 15:30
member庄伟东17-Feb-13 15:30 
QuestionHo to add auto scroll feature on Dialog box? Pin
VCProgrammer15-Feb-13 20:11
groupVCProgrammer15-Feb-13 20:11 
AnswerRe: Ho to add auto scroll feature on Dialog box? Pin
Richard MacCutchan15-Feb-13 22:21
mvpRichard MacCutchan15-Feb-13 22:21 
GeneralRe: Ho to add auto scroll feature on Dialog box? Pin
VCProgrammer17-Feb-13 17:30
groupVCProgrammer17-Feb-13 17:30 
AnswerRe: Ho to add auto scroll feature on Dialog box? Pin
Flaviu217-Feb-13 19:54
memberFlaviu217-Feb-13 19:54 
QuestionClient Certificates in WinHTTP Pin
basementman15-Feb-13 9:27
memberbasementman15-Feb-13 9:27 
QuestionPossible to resolve the question ... in a short time Pin
Haiathem alhmoud15-Feb-13 7:48
memberHaiathem alhmoud15-Feb-13 7:48 
AnswerRe: Possible to resolve the question ... in a short time Pin
jeron115-Feb-13 8:08
memberjeron115-Feb-13 8:08 
AnswerRe: Possible to resolve the question ... in a short time Pin
DavidCrow16-Feb-13 14:56
memberDavidCrow16-Feb-13 14:56 
QuestionWindows 8 Modified Windows API List... Pin
Blake Miller15-Feb-13 7:35
memberBlake Miller15-Feb-13 7:35 
AnswerRe: Windows 8 Modified Windows API List... Pin
Richard MacCutchan15-Feb-13 22:18
mvpRichard MacCutchan15-Feb-13 22:18 
Question_IID_IXMLHTTPRequest linker error Pin
Member 981141114-Feb-13 19:48
memberMember 981141114-Feb-13 19:48 
AnswerRe: _IID_IXMLHTTPRequest linker error Pin
Richard MacCutchan14-Feb-13 23:09
mvpRichard MacCutchan14-Feb-13 23:09 
AnswerRe: _IID_IXMLHTTPRequest linker error Pin
DavidCrow15-Feb-13 5:31
memberDavidCrow15-Feb-13 5:31 
QuestionMCF Pin
FranksLIC14-Feb-13 10:55
groupFranksLIC14-Feb-13 10:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 2 Aug 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid