kk..there were 15 problems for for the monthy projects..i finished 11 of them..these 4 were really hard..
5. your working on a problem in which you must display as integer ratios; therefore you need to be able to compute using common fractions and get the results that are common fractions in reduced form. you want to write a program that will allow you to add, subtract, multiply, and divide common fractions. The program will promt you for a fraction, an operator, and another fraction and then display the problem and the result. The process will be repeated until you enter an n to answer the question: continue>(y/n)
12. A prime number is an integer that has no divisors other than 1 and itself ( for example, the integers 2,3,5,7, and 11). write a program that finds the smallest divisor of a number or determines that the number is a prime number.
9. write a function named factor that factors its parameter, displaying the parameter and all its prime factors. For example, the function call factor(84) should display 84=2*2*3*7. Write a driver function that testes your function with prime numbers and also with numbers having from two to eight prime factors.
10. Two positive integers n and m are considered to be relatively prime if there esist no integer greater then 1 that divides them both. Write a function relprm that has two input parameters, n and m, and returns a value of 1 for true if n and m are relatively prime. Otherwise, relprm should return a value of 0 for false. Write a driver that tests your function.
5. your working on a problem in which you must display as integer ratios; therefore you need to be able to compute using common fractions and get the results that are common fractions in reduced form. you want to write a program that will allow you to add, subtract, multiply, and divide common fractions. The program will promt you for a fraction, an operator, and another fraction and then display the problem and the result. The process will be repeated until you enter an n to answer the question: continue>(y/n)
12. A prime number is an integer that has no divisors other than 1 and itself ( for example, the integers 2,3,5,7, and 11). write a program that finds the smallest divisor of a number or determines that the number is a prime number.
9. write a function named factor that factors its parameter, displaying the parameter and all its prime factors. For example, the function call factor(84) should display 84=2*2*3*7. Write a driver function that testes your function with prime numbers and also with numbers having from two to eight prime factors.
10. Two positive integers n and m are considered to be relatively prime if there esist no integer greater then 1 that divides them both. Write a function relprm that has two input parameters, n and m, and returns a value of 1 for true if n and m are relatively prime. Otherwise, relprm should return a value of 0 for false. Write a driver that tests your function.
Comment