Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please give all part answers in perfectly Write and execute a C program using onlinegdb.com which is an online C compiler with descriptive comments explaining

Please give all part answers in perfectly

Write and execute a C program using onlinegdb.com which is an online C compiler with descriptive comments explaining each line of code, paste the code as text and output obtained as result of execution in the report:

a) Input all numbers from your Student ID, insert them into an array. (See below sample output for an example) [7.5 marks for explaining the code] (15 marks)

b) Calculate the sum of all even numbers (except 2) and all odd numbers (except 3) in the array. [5 marks for explaining the code]

c) Print the larger sum. [2.5 marks for explaining the code] (5 marks)

d) Save all the even numbers in another array called evenos and display the content of that array. [2.5 marks for explaining the code] (5 marks)

e) Display the output as a screenshot with numbers in your Student ID as input. (5 marks)

Example: If the array contains the following elements: 2, 5, 1, 3, 8, 0, 4

The sum of all even elements (except 2) is 8+4=12 The sum of all odd numbers (except 3) is 5+1 = 6 Sum of even number is larger than sum of odd numbers

NOTE: No screen-shots/image allowed for the codes. The solution for this task will be different for each student. No similarity in this task will be acceptable. Similarity/ghostwriting issues arising out of this not being followed will be dealt as per the MEC policy.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions