Click here to Skip to main content
16,016,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: reading cell value from excel through C++ Pin
_AnsHUMAN_ 19-Feb-13 3:04
_AnsHUMAN_ 19-Feb-13 3:04 
Generalconvert the code VB6 to VC++ 6. Pin
Asem Alsaif17-Feb-13 7:38
Asem Alsaif17-Feb-13 7:38 
GeneralRe: convert the code VB6 to VC++ 6. Pin
David Crow17-Feb-13 12:17
David Crow17-Feb-13 12:17 
QuestionWinHttpClient code Pin
el_tel17-Feb-13 1:21
el_tel17-Feb-13 1:21 
AnswerRe: WinHttpClient code Pin
Richard MacCutchan17-Feb-13 2:41
mveRichard MacCutchan17-Feb-13 2:41 
GeneralRe: WinHttpClient code Pin
el_tel17-Feb-13 2:43
el_tel17-Feb-13 2:43 
QuestionCSplitter and CTabCtrl - looking for ideas Pin
Vaclav_16-Feb-13 5:53
Vaclav_16-Feb-13 5:53 
Questioncalculator Pin
abhi sharma15-Feb-13 21:45
abhi sharma15-Feb-13 21:45 
// My first calculator//Abhi's calculator//
#include <iostream>

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="" -="">"<<endl;
cout<<"if="" you="" want="" multiplication="" then="" press="" m="" or="" -="">"<<endl;
cout<<"if="" you="" want="" additionthen="" then="" press="" a="" or="" -="">"<<endl;
cout<<"if="" you="" want="" subtration="" then="" press="" s="" or="" -="">"<<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<
AnswerRe: calculator Pin
Jibesh15-Feb-13 22:03
professionalJibesh15-Feb-13 22:03 
AnswerRe: calculator Pin
Thomas Daniels17-Feb-13 4:42
mentorThomas Daniels17-Feb-13 4:42 
AnswerRe: calculator Pin
庄伟东17-Feb-13 15:30
庄伟东17-Feb-13 15:30 
QuestionHo to add auto scroll feature on Dialog box? Pin
VCProgrammer15-Feb-13 20:11
VCProgrammer15-Feb-13 20:11 
AnswerRe: Ho to add auto scroll feature on Dialog box? Pin
Richard MacCutchan15-Feb-13 22:21
mveRichard MacCutchan15-Feb-13 22:21 
GeneralRe: Ho to add auto scroll feature on Dialog box? Pin
VCProgrammer17-Feb-13 17:30
VCProgrammer17-Feb-13 17:30 
AnswerRe: Ho to add auto scroll feature on Dialog box? Pin
_Flaviu17-Feb-13 19:54
_Flaviu17-Feb-13 19:54 
QuestionClient Certificates in WinHTTP Pin
basementman15-Feb-13 9:27
basementman15-Feb-13 9:27 
QuestionPossible to resolve the question ... in a short time Pin
Haiathem alhmoud15-Feb-13 7:48
Haiathem alhmoud15-Feb-13 7:48 
AnswerRe: Possible to resolve the question ... in a short time Pin
jeron115-Feb-13 8:08
jeron115-Feb-13 8:08 
AnswerRe: Possible to resolve the question ... in a short time Pin
David Crow16-Feb-13 14:56
David Crow16-Feb-13 14:56 
QuestionWindows 8 Modified Windows API List... Pin
Blake Miller15-Feb-13 7:35
Blake Miller15-Feb-13 7:35 
AnswerRe: Windows 8 Modified Windows API List... Pin
Richard MacCutchan15-Feb-13 22:18
mveRichard MacCutchan15-Feb-13 22:18 
Question_IID_IXMLHTTPRequest linker error Pin
Member 981141114-Feb-13 19:48
Member 981141114-Feb-13 19:48 
AnswerRe: _IID_IXMLHTTPRequest linker error Pin
Richard MacCutchan14-Feb-13 23:09
mveRichard MacCutchan14-Feb-13 23:09 
AnswerRe: _IID_IXMLHTTPRequest linker error Pin
David Crow15-Feb-13 5:31
David Crow15-Feb-13 5:31 
QuestionMCF Pin
FranksLIC14-Feb-13 10:55
FranksLIC14-Feb-13 10:55 

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

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