0

Hi Everyone ,
I have 3 questions that need explaination (only explain),then i will try to solve them.

Q1: Let g(x,n) = 1 – x2/2! + x4/4! - … …+(-1)n x2n /(2n)!
Using a loop write a program to calculate g(x,n).

Q2: write a program that accepts a positive integer and gives its prime factorization; that is expresses the integer as a product of primes or indicates that it is a prime.

Q3 is simple if i have numbers ,but in this case i have Character.
Write a program that reads three characters and prints the maximum and the minimum in alphabetical order.

Thanks for your time

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by computer engW
0

Q1: do you know what 2! and 4! mean and how to calculate them with pencil & paper? If not then you need to study factorials, which are used in statistics.

Q3: do it just like you would numbers. Lets say you have three characters 'C', 'A' and 'Z'. Which one is the least and which is the largest. If you still don't know then look up their ascii values in any ascii chart.

0

Yes ,Of course i know factorial.I think i get your idea .Do you mean that i have to do nested for and one of the for statement calculate the factorial.

About ascii chart i don't have any idea .

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.