Can you help me to solve the problem in 315th line pleasee

Pages: 12
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.
Last edited on
It ' s tottaly correct actually:) It' s strange
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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include<iostream>
#include<cmath>
//#include<math.h>
using namespace std;

int main()
{
    int a,b,answer_int;
    double c,d, answer_double;

    a=10;   b=2;
    c=10.0; d=2.0;

    answer_int = pow(a,b);
    answer_double = pow(c,d);
    cout<<"int version "<<answer_int <<endl;
    cout<<"double version "<<answer_double <<endl;

//    cout<<"int version "<<answer_int <<endl;
//    cout<<"double version "<<answer_double <<endl;
//    answer_int = pow(a,d);
//    answer_double = pow(c,b);


    return 0;
}
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.
Cant we try to understand another code.You said we could search the web.We are not trying to cheat.
don't be afraid. i am one of your friends not your teacher, it was a joke :)
good luck with your homework
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.
hello compp,

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,
using namespace 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. :)
It workedd :)
Topic archived. No new replies allowed.
Pages: 12