Question: in c language please materials; The main function should run successfully with different scenarios. A. The main function should perform the following: - Initialize the

materials; The main function should run successfully with different scenarios. A. The main function should perform the following: - Initialize the variable NB with your AUM ID. If your AUM ID is 30375, the value of NB will be 30375. (5 points) - Prompt the user to enter the rank of 2 employees. The rank value should be float number. ( 10 points) - Print your section number, your first name, your last name and your AUM ID on the screen. For example, if your first name =x00, last name =1yy, section number =F4 and ID =30375, the program should print "Lab 1 - Part A is created by student yyy xoo-section F-4 10=30375.(5 points) - Print the average rank of the two employees. (10 points) B. The main function should perform the following: - Print your first name, last name and your student ID on the screen. For example, if your name =x0x yyy, and ID =30375, the program should print "Lab 1 Part B is created by student with 1D=30375 and name yyy rook". (3 points) - Initialize the variable ID with your section number, if your section is F4, the value of ID will be 4. ( 2 points) - Define a float variable named "DICOUNT" followed by the value of your AUM ID. For example, if your AUM ID is 30375 , the name of the variable should be DICOUNT 30375. Initialize the variable DICOUNT_30375 with 0.1 (5 points) - Prompt the user to enter the price (float) of 2 laptops. (10 points) - Print the total price of all laptops before and after discount as shown below in the sample output. (10 points) C. The main function should then perform the following: - Initialize the variable A with your section number. if you're your section is F4, the value of A will be 4 . (2 points) - Initialize the variable B with your AUM ID. If your AUM ID is 30375 , the value of B will be 30375. (3 points) - Print you're the value of A and B on the screen. For example, if your name =x0xyyy, and 10=30375, the program should print "Lab 1 Part C is created by student with 10=30375 and name yyy x xoc". (5 points) - Prompt the user to enter two strings (Major and section number), and then print the entered strings as shown below in the sample output. (15 points) D. The program should adhere the following requirements: - The name of the. C file is equal to your student ID. For example, if your student 10=30375. the name of the file will be " 30375.c. (2 points) - At the end of each instruction in the main function, you should write your ID and your name as comment. (10 points) For example, if your name is xox yyy and your i0 is 30375 , comments should be: - Write your first name, your last name, the course code CS159, your seetion number and your AUM ID as comments at the top of the code as shown below: (3 points). If your name is xxx yyy, your ID is 30375 and your section is F4, comments should be: / This program is created by: a-b-c-d-Studentname=xxxyyyId=30375SectionF4Coursecode:CS159 Sample output: (If your name =xxxyy, section number =F4 and ID =30375 ) Enter the rank of 2 employees: 46 Lab 1 - Part A is created by student yYy xxx - section F4 - ID =30375 The average rank =5.000 1/1/1/1/1/1/1/1/1/ Part B /1/1/1/1/1/1/1/1/1/ Lab 1 Part B is created by student with ID =30375 and name yyy 88 Please enter the cost of 2 laptops: 100200 Total before discount: 300.000 Total with discount: 270.000 1/1/1/1/1/1/1/1/ Part C /1/1/1/1/1/1/1/1/ Lab 1 Part C is created by student with ID=30375 and name yyy xx Enter your Major:CE Enter your Section: F4 You Major is CE Your section is F4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
