1. Write a program to convert the time from 24-hour notation to 12-hour notation. Your program must contain a function that converts the time from 24-hour notation to 12-hour notation. For 12-hour time notation, your program must display AM or PM. Use pass reference method. C:\Users\Faiqa\Desktop\CP1\cp1\Debug... Enter Tine in 24-hour notation (H M) = 13 15 Time in 24-hour notation: 13:15 Tine in 12-hour notation: 1:15 P.M Press any key to continue Enter any no 1234567890 No of Even Digits : 4 No of Odd Digits : 5 C:\Users\Faiqa\Desktop\CP1\cp1\Debug... Enter Time in 24-hour notation (H M>: 838 Tine in 24-hour notation: 0:30 Tine in 12-hour notation: 12:30 A.M Press any key to continue.. Sample Output: Program 1 2. Write a function that takes as parameter an integer (as a long value) and returns the number of odd, even, and zero digits. Also write a program to test your function. Use pass by reference method. C:\Users\Faiqa\Desktop\CP1\cp1\Debug\cp1.... No of Zero Digits : 1 Press any key to continue.... C:\Users\Faiqa\Desktop\CP1\cp1\Debug\cp1... Enter any no : 34534500 No of Even Digits: 2 No of Odd Digits : 4 No of Zero Digits : 2 Press any key to continue.... Sample Output: Program 3

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
1. Write a program to convert the time from 24-hour notation to 12-hour notation. Your program must contain
a function that converts the time from 24-hour notation to 12-hour notation. For 12-hour time notation, your
program must display AM or PM. Use pass by reference method.
C:\Users\Faiqa\Desktop\CP1\cp1\Debug...
Enter Time in 24-hour notation CH M) =
13 15
Time in 24-hour notation: 13:15
Time in 12-hour notation: 1:15 P.M
Press any key to continue
111
Enter any no :
1234567890
No of Even Digits : 4
5
No of Odd Digits:
No of Zero Digits : 1
Press any key to continue
X
111
C:\Users\Faiqa\Desktop\CP1\cp1\Debug...
Enter Time in 24-hour notation (HM) :
0 30
2. Write a function that takes as parameter an integer (as a long value) and returns the number of odd, even,
and zero digits. Also write a program to test your function. Use pass by reference method.
C:\Users\Faiqa\Desktop\CP1\cp1\Debug\cp1....
C:\Users\Faiqa\Desktop\CP1\cp1\Debug\cp1...
Tine in 24-hour notation: 0:30
Tine in 12-hour notation: 12:30 A.M
Press any key to continue
Sample Output: Program 1
O X
Enter any no
34534500
No of Even Digits : 2
No of Odd Digits
: 4
No of Zero Digits : 2
Press any key to continue....
Sample Output: Program 3
111
O O
Transcribed Image Text:1. Write a program to convert the time from 24-hour notation to 12-hour notation. Your program must contain a function that converts the time from 24-hour notation to 12-hour notation. For 12-hour time notation, your program must display AM or PM. Use pass by reference method. C:\Users\Faiqa\Desktop\CP1\cp1\Debug... Enter Time in 24-hour notation CH M) = 13 15 Time in 24-hour notation: 13:15 Time in 12-hour notation: 1:15 P.M Press any key to continue 111 Enter any no : 1234567890 No of Even Digits : 4 5 No of Odd Digits: No of Zero Digits : 1 Press any key to continue X 111 C:\Users\Faiqa\Desktop\CP1\cp1\Debug... Enter Time in 24-hour notation (HM) : 0 30 2. Write a function that takes as parameter an integer (as a long value) and returns the number of odd, even, and zero digits. Also write a program to test your function. Use pass by reference method. C:\Users\Faiqa\Desktop\CP1\cp1\Debug\cp1.... C:\Users\Faiqa\Desktop\CP1\cp1\Debug\cp1... Tine in 24-hour notation: 0:30 Tine in 12-hour notation: 12:30 A.M Press any key to continue Sample Output: Program 1 O X Enter any no 34534500 No of Even Digits : 2 No of Odd Digits : 4 No of Zero Digits : 2 Press any key to continue.... Sample Output: Program 3 111 O O
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
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.
Similar questions
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