Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: something like that8) Pin
hongge11-Jul-03 23:15
hongge11-Jul-03 23:15 
GeneralRe: something like that8) Pin
realfly13-Jul-03 15:40
realfly13-Jul-03 15:40 
GeneralNeed some help(Beginner) Pin
Fightingbee11-Jul-03 19:43
Fightingbee11-Jul-03 19:43 
GeneralRe: Need some help(Beginner) Pin
Michael Dunn11-Jul-03 20:09
sitebuilderMichael Dunn11-Jul-03 20:09 
GeneralRe: Need some help(Beginner) Pin
Fightingbee11-Jul-03 20:21
Fightingbee11-Jul-03 20:21 
GeneralRe: Need some help(Beginner) Pin
Michael P Butler11-Jul-03 21:43
Michael P Butler11-Jul-03 21:43 
GeneralRe: Need some help(Beginner) Pin
Fightingbee12-Jul-03 5:54
Fightingbee12-Jul-03 5:54 
GeneralRe: Need some help(Beginner) Pin
Snyp12-Jul-03 6:33
Snyp12-Jul-03 6:33 
OK First of all you should make all of your int be double.
Whats up with your spacing anyways it's like 20 spaces for a tab.
Your making it too complicated for your self. Here is what I made when I was a beginner hopefully it will teach you something.

#include <iostream>
using namespace std;
float inputOne, inputTwo, answer;
char operator_, yn;
int main()


{
while (yn != 'n')


{
cout << "First number + - / * ^ second number\n";
cin >> inputOne >> operator_ >> inputTwo;
if (operator_ == '+')
answer = inputOne + inputTwo;
if (operator_ == '-')
answer = inputOne - inputTwo;
if (operator_ == '*')
answer = inputOne * inputTwo;
if (operator_ == '/')


{
if (inputTwo == 0)


{
cout << "Cannot divide by 0";
}
else
answer = inputOne / inputTwo;
}
if (operator_ == '^')


{
answer = inputOne;
for (int i=2; i<=inputTwo; i++)
answer = answer * inputOne;
}
cout << endl;
cout << inputOne << " " << operator_ << " ";
cout << inputTwo << " = " << answer;
cout << "\n\nSolve another? <y><n> ";
cin >> yn;
cout << "\n";
}
return 0;
}

[It is possible to represent everything in this universe by using 0 and 1]

I was born intelligent
Education ruined me!.

An idea is useless until it has been implemented.
GeneralChanging Font Pin
Kristian Kratzenstein11-Jul-03 19:39
Kristian Kratzenstein11-Jul-03 19:39 
GeneralRe: Changing Font Pin
hongge11-Jul-03 20:29
hongge11-Jul-03 20:29 
GeneralRe: Changing Font Pin
Kristian Kratzenstein11-Jul-03 21:10
Kristian Kratzenstein11-Jul-03 21:10 
GeneralRe: Changing Font Pin
pranavamhari11-Jul-03 22:35
pranavamhari11-Jul-03 22:35 
GeneralRe: Changing Font Pin
Kristian Kratzenstein12-Jul-03 6:21
Kristian Kratzenstein12-Jul-03 6:21 
GeneralOn Un-minimizing information stored in array is not shown. Pin
Terry Eff11-Jul-03 19:04
Terry Eff11-Jul-03 19:04 
Questionhow text can display in spiral form Pin
Member 47204511-Jul-03 15:01
Member 47204511-Jul-03 15:01 
AnswerRe: how text can display in spiral form Pin
Anthony_Yio15-Jul-03 1:23
Anthony_Yio15-Jul-03 1:23 
AnswerRe: how text can display in spiral form Pin
Anthony_Yio15-Jul-03 1:23
Anthony_Yio15-Jul-03 1:23 
Questionwhat is the different between the DLL and application Pin
gdzfy11-Jul-03 14:33
gdzfy11-Jul-03 14:33 
AnswerRe: what is the different between the DLL and application Pin
gdzfy11-Jul-03 14:34
gdzfy11-Jul-03 14:34 
GeneralRe: what is the different between the DLL and application Pin
John M. Drescher11-Jul-03 17:49
John M. Drescher11-Jul-03 17:49 
GeneralRe: what is the different between the DLL and application Pin
Snyp12-Jul-03 6:37
Snyp12-Jul-03 6:37 
GeneralThreads and ~Component Pin
Paul Farry11-Jul-03 14:31
professionalPaul Farry11-Jul-03 14:31 
GeneralRe: Threads and ~Component Pin
Ryan Binns11-Jul-03 16:05
Ryan Binns11-Jul-03 16:05 
GeneralContext Menu Cursor Problem Pin
dWorkVan11-Jul-03 13:55
dWorkVan11-Jul-03 13:55 
GeneralRe: Context Menu Cursor Problem Pin
Mike Nordell12-Jul-03 4:21
Mike Nordell12-Jul-03 4:21 

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.