Decompiler help

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions Decompiler help
# 1  
Old 10-27-2010
Decompiler help

look, i downloaded IDA decompiler (is there a better one), its asking a whole bunch of stuff that i do not understand. how do i make this work? It asks me about a new disassembly database...what is all this

1. The problem statement, all variables and given/known data:

Write a function named isPrime which accepts one integer parameter, say x. Have the function return TRUE if x is a prime. Otherwise, have it return FALSE.

b) Write a program that keeps asking the user for an integer say k. As long as k is greater than 0, the program will call isPrime to see if k is a prime. Print the message “Prime” if it is and “Not Prime” if not. Please run p4step1.exe in the class directory for details.


Step 2: a) Modify the above program so that the user will enter two integers say x and y. As long as y > x, the program will print all primes between x and y inclusive.

b) Write a function named findPrime which accepts two integer parameters say a and b. This function will print all prime numbers from a to b by calling the function isPrime. Have your program call this function using the user input x and y. Please run p4step2.exe for details.

c) In step a) your program should have two functions main and isPrime. In step b) there should be an additional function findPrime.


I know how to write like the first step and that's it.

2. Relevant commands, code, scripts, algorithms:


1. You need to use the following functions:
a. (int) isPrime(int k),
b. (int) isPerfect( int k),
c. void findPrime(int x, int y);
d. void findPerfect(int x, int y);
e. void findSquare(int x, int y).
2. You need to use floor and ceil functions in <math.h> for finding the Square number.

3. The attempts at a solution (include all code and scripts):


int
_tmain(int argc, _TCHAR* argv[])
{
int x;
int k;
printf(
"Enter a positive integer -->", x);

return 0;
}
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Programming

C Program Decompiler

Does anyone know any C++ program decompiler tool? Appreciate anyone's help. (2 Replies)
Discussion started by: kharen11
2 Replies
Login or Register to Ask a Question