C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28629
Number of posts: 94611

This Forum Only

hello fellow programmers I am here to seek your help about this Posted by hurtmemore on 7 Oct 2012 at 10:33 AM
Problem 1: Basic Mathematical Operations

Create a C program that will input N number and create a function that determines the following SUM, AVERAGE, EVEN Numbers ODD Numbers, Prime Numbers and FACTORIAL of the given N integers.

Consider the following sample output.

Enter N numbers: 10

Value of number 1-3
Value of number 2-3
Value of number 3-7
Value of number 4-3
Value of number 5- 2
Value of number 6- 3
Value of number 7- 45
Value of number 8- 4
Value of number 9 - 3
Value of number 10-19

Sum: 92
Average: 9.2

EVEN Numbers: 2, 4

ODD Number: 3,3,7,7,3,45,3,19

PRIME Numbers: 3,3,7,3,2,3,3

Factorial:
Value 1- 3 = 6
Value 2- 3 = 6
.
.
.
Value 10 – 19 = ?

Problem 1: Basic Mathematical Operations

Create a C program that will input N number and create a function that determines the following SUM, AVERAGE, EVEN Numbers ODD Numbers, Prime Numbers and FACTORIAL of the given N integers.

Consider the following sample output.

Enter N numbers: 10

Value of number 1-3
Value of number 2-3
Value of number 3-7
Value of number 4-3
Value of number 5- 2
Value of number 6- 3
Value of number 7- 45
Value of number 8- 4
Value of number 9 - 3
Value of number 10-19

Sum: 92
Average: 9.2

EVEN Numbers: 2, 4

ODD Number: 3,3,7,7,3,45,3,19

PRIME Numbers: 3,3,7,3,2,3,3

Factorial:
Value 1- 3 = 6
Value 2- 3 = 6
.
.
.
Value 10 – 19 = ?

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic