in C Program

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

in C Program

Post by answerhappygod »

in C Program
In C Program 1
In C Program 1 (54.8 KiB) Viewed 28 times
1. Scan in your first name. Use gets()); 2. Print out your name in an 18 character wide field. 3. Print out your name in a 15 character wide field left aligned. 4. Print out only 3 characters of your name in a field 20 characters wide. 5. Read in an integer variable value1 (enter 234). (a) Print out in a field 10 characters wide. (b) Print out using %2d. 6. Read in an integer variable value2 (enter 59). (a) Print out in a field 5 characters wide and left align. (b) Print out using printf("%*d", 14, value2). 7. Read in a floating point variable x (22.2257). (a)Print out in a field 12 digits wide with 2 digits of precision. (b) Print out using %1.0f. 8. Read in a floating point variable x (22.2257). (a)Print out in a field 10 digits wide with 1 digit of precision. (b) Print out using printf("%*.*f", 10, 3, x).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply