Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c programming lab 2 1. Lab Target (1) Understand the rules of defining variables and assigning values (2) Master the way of using printf function
c programming lab 2
1. Lab Target (1) Understand the rules of defining variables and assigning values (2) Master the way of using printf function to output variables on the screen (3) Master basic use of arithmetic operators 2. Tools Operation System: Windows XP Programming Language: C Textbook C Programming A Q&A approach 3. Tasks (After finish the following tasks, hand in Lab Reports, all source code, and snapshot of running results) 3.1 Task One (1) Type the example code on Page 40, compile, run it and capture its output. (2) Suppose your month salary is 3500.0 Yuan, You work 9 months per year, and take 3 month for vocation during which time you are paid with half of your regular salary. Your month expense is 111.1 Yuan You are asked to define proper variables and complete a program to calculate your annual Saving. The information displayed on the screen looks like the following ve salary te worked for the Yes to the envases during which one 175. / is seal, y seed 46. Y recept i on time te.359 3.2 Task Two Write a C program that accepts (-) two item's weight (floating points values ) and number of purchase (floating points' values) and calculate the average value of the items Display the messages on the window forint) Test Data: Students should use different data in a program) Weight Item: 15 Number of item1: 5 Weight. Item2: 25 Number of item24 Expected Output: Average Value - 19.444444 3.3 Task Three Write a C program to convert specified days() into years, weeks and days. Display the messages on the window (print) Note: Ignore leap year Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started