Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How would I make this program restart?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Mon Feb 28, 2011 1:13 pm    Post subject: How would I make this program restart? Reply with quote

Code:
// Calculator+, by James Fisher

// Include the iostream library
#include <iostream>

//Use the standard namespace
using namespace std;

void main ( )
{
   // Declare the variables
   float Number_1;
   float Number_2;
   float Result;
   int Which_Calculation;
   int Restart;

   // Give instructions
   cout << "Choose a task. Press 1 to add, 2 to subtract, 3 to multiply, and 4 to divide." << endl;
   cin >> Which_Calculation;

   // Get numbers
   cout << "Please enter the first number." << endl;
   cin >> Number_1;
   cout << "Please enter the second number." << endl;
   cin >> Number_2;
 
   if (Which_Calculation == 1)
   {
      // Calculate the result
      Result = Number_1 + Number_2;
   } 

   if (Which_Calculation == 2)
   {
      // Calculate the result
      Result = Number_1 - Number_2;
   } 

   if (Which_Calculation == 3)
   {
      // Calculate the result
      Result = Number_1 * Number_2;
   }

   if (Which_Calculation == 4)
   {
      // Calculate the result
      Result = Number_1 / Number_2;
   }
   // Print the answer is...
   cout << "The answer is..." << endl;

   // Print the result
   cout << Result << endl;
   
   // Ask the user if they would like to do another problem.
   cout << "Hit 1 to do another problem, 2 to exit." << endl;
   // Restart the application
   if (Restart == 1)
   {
      // Restart the program
      HERE!!!
   } 

   if (Restart == 2)
   {
      // End the program
     system ("PAUSE");
     cin << "Press any key to end the program." << endl;
   }
}

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
sachamr
How do I cheat?
Reputation: 0

Joined: 26 Feb 2011
Posts: 2

PostPosted: Mon Feb 28, 2011 1:16 pm    Post subject: Reply with quote

im not really good in programing, but i think you should simply destroy the end so its will create a loop
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Mon Feb 28, 2011 1:30 pm    Post subject: Reply with quote

Find some new books
Back to top
View user's profile Send private message MSN Messenger
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Mon Feb 28, 2011 1:30 pm    Post subject: Reply with quote

Noz3001 wrote:
Find some new books

wut?
I don't have a book.

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Mon Feb 28, 2011 1:35 pm    Post subject: Reply with quote

The Fish wrote:
Noz3001 wrote:
Find some new books

wut?
I don't have a book.


This explains it all
Back to top
View user's profile Send private message MSN Messenger
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Mon Feb 28, 2011 1:35 pm    Post subject: Reply with quote

Noz3001 wrote:
The Fish wrote:
Noz3001 wrote:
Find some new books

wut?
I don't have a book.


This explains it all

It does.

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Mon Feb 28, 2011 1:38 pm    Post subject: Reply with quote

Put it all in a while loop or be lazy and use a goto
Back to top
View user's profile Send private message MSN Messenger
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Mon Feb 28, 2011 1:44 pm    Post subject: Reply with quote

Noz3001 wrote:
Put it all in a while loop or be lazy and use a goto

How would I use the loop?

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Mon Feb 28, 2011 1:46 pm    Post subject: Reply with quote

The Fish wrote:
Noz3001 wrote:
Put it all in a while loop or be lazy and use a goto

How would I use the loop?


GET YOUR DICK OUT OF YOUR ASS AND USE GOOGLE

_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Mon Feb 28, 2011 1:50 pm    Post subject: Reply with quote

Haxory' wrote:
The Fish wrote:
Noz3001 wrote:
Put it all in a while loop or be lazy and use a goto

How would I use the loop?


GET YOUR DICK OUT OF YOUR ASS AND USE GOOGLE

google aint giving me an answer.

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Feb 28, 2011 1:52 pm    Post subject: Reply with quote

Haxory' wrote:
The Fish wrote:
Noz3001 wrote:
Put it all in a while loop or be lazy and use a goto

How would I use the loop?


GET YOUR DICK OUT OF YOUR ASS AND USE GOOGLE


FUCKING LOL.
Back to top
View user's profile Send private message
Haxory'
Grandmaster Cheater Supreme
Reputation: 92

Joined: 30 Jul 2007
Posts: 1900

PostPosted: Mon Feb 28, 2011 1:55 pm    Post subject: Reply with quote

http://www.bluesfear.com/tutorials/C%2B%2Bwhileloop.php

if you cant handle that you should really reconsider your school project or w/e

_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel
Back to top
View user's profile Send private message
potaters
Grandmaster Cheater
Reputation: 72

Joined: 13 Apr 2009
Posts: 969

PostPosted: Mon Feb 28, 2011 1:57 pm    Post subject: Reply with quote

Fish, may I suggest you ask in teh coding section of this forum?
Or goto a C++ coding forum. Instead of asking the 3~5 skilled C++ coders here.
Back to top
View user's profile Send private message
The Fish
Expert Cheater
Reputation: 3

Joined: 11 Aug 2008
Posts: 114
Location: Ohio bitch

PostPosted: Mon Feb 28, 2011 2:02 pm    Post subject: Reply with quote

xen0r wrote:
Fish, may I suggest you ask in teh coding section of this forum?
Or goto a C++ coding forum. Instead of asking the 3~5 skilled C++ coders here.

The coding section is pretty dead.
I'll get a faster answer here.

_________________
It was nice while it lasted.
Back to top
View user's profile Send private message
DeletedUser14087
I post too much
Reputation: 2

Joined: 21 Jun 2006
Posts: 3069

PostPosted: Mon Feb 28, 2011 2:06 pm    Post subject: Reply with quote

This is why i hate console projects Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites