Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases
You last visited: Today at 15:25

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release]Create a calculator - with c++

Discussion on [Release]Create a calculator - with c++ within the Coding Releases forum part of the Coders Den category.

Closed Thread
 
Old   #1

 
.Sags Barney .!'s Avatar
 
elite*gold: 4
The Black Market: 142/0/0
Join Date: Nov 2010
Posts: 3,320
Received Thanks: 845
[Release]Create a calculator - with c++

PHP Code:
#include 
#include 
using namespace std

int main() 



int rechenoptionen
double number1//always use float or double for number1 and 2 
double number2


cout << "Calculator create by exaple" << endl
cout << "take your Choose" << endl
cout << "one for plus" << endl
cout << "tow for minus" << endl
cout << "three for mutiply" << endl
cout << "four for dividend" << endl
cin >> rechenoptionen


if (
rechenoptionen == 1



cout << "Plus..." << endl
cout << "enter your first number" << endl
cin >> number1
cout << "enter your second number" << endl
cin >> number2
cout << number1 << " + " << number2 << " = " << (number1 number2) << endl


if (
rechenoptionen == 2



cout << "minus..." << endl
cout << "enter your first number" << endl
cin >> number1
cout << "enter your second number" << endl
cin >> number2
cout << number1 << " - " << number2 << " = " << (number1 number2) << endl


if (
rechenoptionen == 3


cout << "multiple..." << endl
cout << "enter your first number" << endl
cin >> number1
cout << "enter your second number" << endl
cin >> number2
cout << number1 << " X " << number2 << " = " << (number1 number2) << endl

if (
rechenoptionen == 4

cout << "dividend..." << endl
cout << "enter your first number" << endl
cin >> number1
cout << "enter your second number" << endl
cin >> number2
cout << number1 << " : " << number2 << " = " << (number1 number2) << endl



system("PAUSE"); 

.Sags Barney .! is offline  
Old 11/01/2011, 23:34   #2
 
BigM''s Avatar
 
elite*gold: 11
Join Date: Nov 2009
Posts: 1,247
Received Thanks: 363
Kommt hinein!
Anstelle der vielen "If"s würde ich ein switch einbauen.
MfG
BigM' is offline  
Old 11/02/2011, 14:38   #3
 
Che's Avatar
 
elite*gold: 120
Join Date: Aug 2010
Posts: 7,448
Received Thanks: 2,756
Quote:
Originally Posted by BigM' View Post
Kommt hinein!
Anstelle der vielen "If"s würde ich ein switch einbauen.
MfG
Nein. Da rein darf es nur, wenn der Source erklärt ist. So ist es kein Tutorial sondern nur ein Snippet!
Che is offline  
Thanks
1 User
Old 11/02/2011, 15:02   #4
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
#include <windows.h>
#include <iostream>

?
omer36 is offline  
Old 11/02/2011, 15:35   #5

 
.Sags Barney .!'s Avatar
 
elite*gold: 4
The Black Market: 142/0/0
Join Date: Nov 2010
Posts: 3,320
Received Thanks: 845
Nein , befolg es genauso so wie ich es beschrieben habe.

So ist es nämlich richtig.
.Sags Barney .! is offline  
Old 11/02/2011, 15:46   #6
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
Quote:
Originally Posted by Dr. John Dorian' View Post
Nein , befolg es genauso so wie ich es beschrieben habe.

So ist es nämlich richtig.
Mag ja sein, dass ich mich mit C++ nicht besonders auskenne, jedoch mag ich mich erinnern, dass wenn du die cin bzw cout Befehle nutzen möchtest, auf den vorgefertigten "iostream" zugreifen musst und " system("PAUSE") " braucht die windows.h.

Wobei die meisten (soweit ich weiß) eher _getch() verwenden und den dazugehörigen conio.h header (header? ist das richtig?).


Aber du bist hier der Experte, also lass ich es mal
omer36 is offline  
Old 11/03/2011, 21:06   #7

 
.Sags Barney .!'s Avatar
 
elite*gold: 4
The Black Market: 142/0/0
Join Date: Nov 2010
Posts: 3,320
Received Thanks: 845
Nein kein Experte , möglich wäre es nicht , weil man eine ganz neue struktur bräuchte.
.Sags Barney .! is offline  
Old 11/03/2011, 22:26   #8
 
BigM''s Avatar
 
elite*gold: 11
Join Date: Nov 2009
Posts: 1,247
Received Thanks: 363
Quote:
Originally Posted by 〤Che〤 View Post
Nein. Da rein darf es nur, wenn der Source erklärt ist. So ist es kein Tutorial sondern nur ein Snippet!
Und somit nur Source eines Rechners, daher gehört es in den "kleinere Releases" Thread- dort gibt es genügend Rechner.

MfG
BigM' is offline  
Old 11/13/2011, 17:57   #9


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by Dr. John Dorian' View Post
Nein , befolg es genauso so wie ich es beschrieben habe.

So ist es nämlich richtig.
Quote:
Originally Posted by Dr. John Dorian' View Post
Nein kein Experte , möglich wäre es nicht , weil man eine ganz neue struktur bräuchte.
Wenn du #include keinen Pfad zu nem Header übergibst, ist es ein Syntax-Fehler.
Und man braucht windows.h und iostream für die verwendeten Funktionen.

Demnach lässt sich dein Code nicht compilen. Und eine neue Struktur würde dadurch nicht benötigt werden.

Kurz: Du redest Bullshit.
MrSm!th is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
[Release] Asal Calculator
09/11/2012 - Flyff - 58 Replies
.
[Release]Fortification calculator
06/09/2012 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 31 Replies
So yeah, here's something random! This tool calculates the chances of successfully upgrading an item or a number of items, from a selected fortification level to another one. Don't ask me why I made this. I guess I just had nothing better to do, and since I made it, why not release it? :D Default Global A8 fortification rates are implemented in program, but it can load an itemupgrade.csv file (Both A1-A6 and A7+ architecture, so it can easily be used for private servers as well) and use...
[RELEASE]PSF EXP CALCULATOR
12/05/2009 - Soldier Front Hacks, Bots, Cheats & Exploits - 1 Replies
That's not a hack, just a little exp calculator. (Sorry if it's not the right place to post it) Please read the ReadMe.txt before using. ;) Size: 311Ko Download Link : RapidShare: 1-CLICK Web hosting - Easy Filehosting Or : MEGAUPLOAD - The leading online storage and file delivery service



All times are GMT +1. The time now is 15:28.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.