Most People wont just hand you code for the hell of it. So ill give you a start.
First you have to select a library that you want to transfer in to your .cpp or program file.
#include <[library name]>
Then after that you have the option of using namespaces or function's or w.e you want.
using namespace [insert namespace];
After that you have to get down to the program, so to tell your c++ compiler to start at a certain point you use a function by the name of main.
1 2 3 4 5
|
[insert type] main ([insert w.e])
{
}
|
Now inside the curly brackets you will have to write what you want c++ to do/ launch/ accomplish.
Most commonly sense you wish to deal with number's, it is recommended to create a variable with a type specifying to you number's type.
int, long, double,or float(sense you wish to use 5 different number you need 5 different variable or a array with 5 element's. But to keep it simple i would recommend the use of a array with 5 element's);
1 2 3 4 5
|
[insert type] main ([insert w.e])
{
float [insert Array][elements] ;
}
|
Now that you have a array with five element's(no value has been given to them yet so they are called unsigned) we can manipulate them how ever we want.
Post what you think would be required to accomplish what your asking for.
1 2 3 4 5 6 7 8
|
[insert type] main ([insert w.e])
{
float [insert Array][elements] ;
blah blah blah
blah blah blah
blah blah blah
blah blah blah
}
|