C++ Conditional Statement Based on Time
Not what you're looking for?
I have written a program for multidimensional integration that employs several techniques of integration, varying over different ranges, because one technique will take less time to integrate over a certain region of space than another.
I would like to know how to write a conditional statement based on the amount of time that has passed in obtaining a result. In other words, as the process is running, it has a maximum amount of time to attempt a solution with one method, and then must switch to another method. So, after the program attempts a calculation with method "a" and does not obtain a result after an amount of time "t" , it stops using "a" and starts using method "b". So while time< t, use method a, when time>t, switch to method b. Hopefully I'm explaining this correctly. If you can just show me how to do this for a general example, I will adapt it to my system.
Purchase this Solution
Solution Summary
C++ conditional statements base on time are examined in the solution.
Solution Preview
Please check attachment.
//C++ conditional statement based on time
//
//I have written a program for multidimensional integration that employs several techniques of integration,
//varying over different ranges, because one technique will take less time to integrate over a certain region
//of space than another.
//
//I would like to know how to write a conditional statement based on the amount of time that has passed in obtaining a result.
//In other words, as the process is running, it has a maximum amount of time to attempt a solution with one method,
//and then must switch to another method.
//
// So, after the program attempts a calculation with method "a" and does not obtain a result after an amount of time "t" ,
// it stops using "a" and starts using ...
Purchase this Solution
Free BrainMass Quizzes
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Javscript Basics
Quiz on basics of javascript programming language.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
Basic Networking Questions
This quiz consists of some basic networking questions.