compp,
I'm going to recommend passing variables that you have strict declarations on,
like the pow (10,something)
would be turned into
1 2 3 4
double ten;
ten = 10;
functionx= pow(ten, something);
you'll have to work on small parts at a time until you work out all the little bugs.
And yes your program does work, here is an output from my computer:
########################################
############COUPON GENERATOR############
########################################
Press 1 ------>Generate lotto coupon
Press 2 ------>Generate lotto coupon with a constant number
Press 3 ------>Generate lotto coupon with number range
Press 4 ------>Generate lotto coupon with number distance
Press 0 ------>Exit
Enter your option
2
You chose to generate lotto coupon with a constant number.
Enter column count
6
Enter const. number
3
Enter const. column count
6
3 31 32 1 37 34
3 19 33 18 5 32
3 7 20 46 31 37
3 41 26 32 39 19
3 39 18 37 6 30
3 16 32 14 49 26
Process returned 0 (0x0) execution time : 7.860 s
Press any key to continue.
I dont know if this is 'correct' in the sens that it runs and it doesnt crash. while the program is syntactically correct, i know know if its symantically correct. you should be the only one to tell me if its working correctly.
compp, i should have thought of this before,
lets see if your compiler is just too strict,
run this program and see if it runs at all. this is just to test if it can run.
its using the simplest declarations that you're using in your program.
Function generates random numbers for an algorithm described following lines uses time(0) seed. You
can use “srand(time(0))” and “rand()” functions placed in “ctime” and “cstdlib” libraries respectively.
E.g. it is started with seed 54321.
54321^2 = 2950771041 getRange (2950771041, 3, 7) // returns 50771
50771^2 = 2577694441 getRange (2577694441, 3, 7) // returns 77694
Could you please xplain what does this mean?
and by the way the code that you wrote didnt work too and gave the same error
I would prefer you to complete your ise102 homework by yourself. Do not send this raw codes. Otherwise you will get 0 point for this assignment. And I remind you to read academic honesty rules again.
Haha.Everybody found this code already but i couldn make it execute becasue i am getting a error.İ wont use it by im trying to understand how can i do mine.
ok, if you cant resolve your compiler, you might try getting a different compiler, sorry I cant help you with that problem.
I downloaded and ran MSVCPP10 express this weekend and tried a quick test and it worked. so I dont know what else might be wrong with your DEVC++ compiler, other than listening to all the forum talk here that you should stop using it since its got a lot of issues with and older version of MingW. if these are school computers you'll need them to take a look at why this wouldnt compile. if you inherited your computer, you can reinstall over it, maybe your PATHS got messed up? OR are you even using windows? are you on a Mac? or a Linux desktop?
this is the code I tested with a VSC++2010 express compiler, a windows console,without a precompiled header, stripped down to just the essentials:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include<iostream>
#include<cmath>
//#include "stdafx.h" //dont really need this...but MS always puts this in,
usingnamespace std;
int main()
{
double a;
int b;
a=10.0;
b=2;
cout << "hello world" << endl;
cout << pow(a,b) << endl;
system ("pause"); //yes i did this, just a small test, i know i will catch a lot of heat for doing this,
return 0;
}
Sorry if this isnt working for you, apart from me charging you for technical help for your compiler and desktop support. :)