Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a printf or scanf statement for each of the following: a. Print 200 with a

ID: 3838130 • Letter: W

Question

Write a printf or scanf statement for each of the following:

a. Print 200 with and without a ‘+’ sign.

b. Print 1.234 in a 9-digit field with preceding zeros.

c. Read characters into array s until the letter p is encountered.

d. Read a time of the form hh:mm:ss, storing the parts of the time in the integer variables hour, minute, and second. Skip the colons (:) in the input stream. Use the assignment suppression character.

e. Repeat (d) without using the assignment suppression character. This is for C

Explanation / Answer

(a)

(b)

(c).

(d).

output :

Enter a time in either hh:mm:ss
06:25:60
hours = 6
mins = 25
seconds=60

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote