Write a C program with the following functions. 1) Write a function Odd_Avg to do the following: • print the below line on the screen. Fill your name in the "YYYYY" position. "This is function Odd_Avg. Student Name-YYYYY" • prompt the user to enter N integer values and read it using a for loop. Value N is equal to the sum of the first and the last digit of your student ID. If your ID is 34521, then N will be 4 (3+1). The function should then calculate and print the average of all odd numbers entered by the user. 2) Write a function Find_Sum to do the following: • print the below line on the screen. Fill your ID in the "XXXXX" position. "My ID-XXXXX.This is function Find_Sum." prompt the user to enter M integer values and read it using a do while loop. Value M is equal to the number of letters in your first name. If your first name is "Ahmed" , then M will be 5. The function should then calculate and return the sum of all numbers entered by the user which are a multiple of 5. 4) Write a main function: • that prints your name, ID and section on the screen in the below format. You should fill your name and ID in the position of YYYYY and XXXXX respectively. Lab Assignment -2 • • Name YYYYYY ID : XXXXX Section : U1 • Call the function Odd_Avg. Call the function Find_Sum and print the returned value as per the sample output. print a line of N number of "#" symbols using a while loop. Value N is the sum of all digits of your student ID. If your ID is 23412, then N=12(2+3+4+1+2) 5) Write your first name, your last name and your ID as comments at the top of the code.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

example the name is Jack Robert , ID 53605 in C language. thank you

Write a C program with the following functions.
1) Write a function Odd_Avg to do the following:
• print the below line on the screen. Fill your name in the "YYYYY" position.
"This is function Odd_Avg. Student Name-YYYYY"
prompt the user to enter N integer values and read it using a for loop. Value N is
equal to the sum of the first and the last digit of your student ID. If your ID is
34521, then N will be 4 (3+1). The function should then calculate and print the
average of all odd numbers entered by the user.
2) Write a function Find_Sum to do the following:
• print the below line on the screen. Fill your ID in the "XXXXX" position.
"My ID-XXXXX.This is function Find_Sum."
prompt the user to enter M integer values and read it using a do while loop. Value
M is equal to the number of letters in your first name. If your first name is "Ahmed"
, then M will be 5. The function should then calculate and return the sum of all
numbers entered by the user which are a multiple of 5.
4) Write a main function :
• that prints your name, ID and section on the screen in the below format. You
should fill your name and ID in the position of YYYYY and XXXXX respectively.
Lab Assignment -2
Name YYYYYY
ID
:XXXXX
Section U1
Call the function Odd_Avg.
Call the function Find_Sum and print the returned value as per the sample output.
print a line of N number of "#" symbols using a while loop. Value N is the sum of
all digits of your student ID. If your ID is 23412, then N=12(2+3+4+1+2)
5) Write your first name, your last name and your ID as comments at the top of the code.
Transcribed Image Text:Write a C program with the following functions. 1) Write a function Odd_Avg to do the following: • print the below line on the screen. Fill your name in the "YYYYY" position. "This is function Odd_Avg. Student Name-YYYYY" prompt the user to enter N integer values and read it using a for loop. Value N is equal to the sum of the first and the last digit of your student ID. If your ID is 34521, then N will be 4 (3+1). The function should then calculate and print the average of all odd numbers entered by the user. 2) Write a function Find_Sum to do the following: • print the below line on the screen. Fill your ID in the "XXXXX" position. "My ID-XXXXX.This is function Find_Sum." prompt the user to enter M integer values and read it using a do while loop. Value M is equal to the number of letters in your first name. If your first name is "Ahmed" , then M will be 5. The function should then calculate and return the sum of all numbers entered by the user which are a multiple of 5. 4) Write a main function : • that prints your name, ID and section on the screen in the below format. You should fill your name and ID in the position of YYYYY and XXXXX respectively. Lab Assignment -2 Name YYYYYY ID :XXXXX Section U1 Call the function Odd_Avg. Call the function Find_Sum and print the returned value as per the sample output. print a line of N number of "#" symbols using a while loop. Value N is the sum of all digits of your student ID. If your ID is 23412, then N=12(2+3+4+1+2) 5) Write your first name, your last name and your ID as comments at the top of the code.
Expert Solution
steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education