This is for a 100 level class. Very basic programming, something that anyone who just learned could figure out.
1) The first program will compute compounded interest
2) Write a main program that calls a sub-function (child function) that indicates if the value passed is odd
3) Write the function:
int power(int n, int m)
The power() function computes a int n raised to the integer m power (i.e.: nm).
Use it in a main program that prompts the user for n and m, and then prints the result = nm. The program should repeat this process until the user enters a value of 0 for n, which causes the main program to exit.
4) Write a program that consists of two functions, main and isprime that meet the following specifications:
The function isprime should have the following prototype:
int isprime(int x);
The function should return value 1 if x is a prime number, and 0 otherwise. For example, the function call "isprime(17);" should return 1, since 17 has no divisors other than 17 and 1 (hence 17 is a prime number). The call "isprime(21);" should return 0 (3 and 7 are both divisors of 21, hence 21 is not a prime number).
The function main will print out all the prime numbers between 1 and 1000. Print the prime numbers in rows, 10 numbers per row, in evenly spaced columns.
The task you require can be done given a little time, As I am starting from scratch I can work on the lowest rate possible with quickest delivery possible.
11 freelancers are bidding on average $20 for this job
Hello! I am very interested in your project and I would like to work for you. It is very easy for me and I can provide the work really quick. Please contact me if you are interested. Have a nice day!