Professional Documents
Culture Documents
Task 1
Write a function that calculates and print the sum of given numbers
int Sum (int num1, int num2, int num3, int num4)
Task 2
Write a Function that computes the power of given number.
Task 3
Write a program that calculates and prints the product of the odd integers between the range
Task 4
Write a function that takes a number as argument and return 1 if number is prime otherwise
return 0.
Task 5
Write a function which take 2 values as range and print all prime number between the range
given. For this you may use your own function isPrime().
Task 6
Create an array of user defined size. Fill this array with random numbers (Auto Generated). Create a
menu from 1 to 6 to perform operation on array. As the option is selected. It repeats until the user press
8 for exit. For each option you must write a function which takes the array and any other required data.
1. Update array (Ask user to enter index and value to update)
2. Print the array
3. Find minimum
4. Find maximum
5. Search a number (Ask the user enter a number to search, and return the index of number
searched)
6. Sort the array