C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
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 = ?















































Thread Tree



 

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
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.