CSCI250L Sample Exam 1 Spring 2020- Write a program that prompts the user to enter the name, the number of children, and the basic salary of a The program will then: Calculate the bonus: Calculate the new salary: • Apply a tax of 10% and find the paid salary: The program will then display all the information needed as shown in the sample run below Sample Run:
Types of Loop
Loops are the elements of programming in which a part of code is repeated a particular number of times. Loop executes the series of statements many times till the conditional statement becomes false.
Loops
Any task which is repeated more than one time is called a loop. Basically, loops can be divided into three types as while, do-while and for loop. There are so many programming languages like C, C++, JAVA, PYTHON, and many more where looping statements can be used for repetitive execution.
While Loop
Loop is a feature in the programming language. It helps us to execute a set of instructions regularly. The block of code executes until some conditions provided within that Loop are true.
![CSCI250L
Sample Exam 1
Spring 2020-2021
Write a program that prompts the user to enter the name, the number of children, and the basic salary of an cmployee.
The program will then:
Calculate the bonus:
Calculate the new salary:
• Apply a tax of 10% and find the paid salary:
The program will then display all the information neceded as shown in the sample run below
Sample Run:
Enter the name of the employee: Jamal
Enter the number of children of the employee: 4
Enter the salary of the employee (in $): 1500
The calculated bonus is $100 for 4 children.
The new salary is $1600.0
The paid salary for Jamal is $1440.0
Page
2 1 3](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Faf3b7374-38f6-4410-b7ad-ca3362d81817%2F53cf7194-75ba-4880-8c6a-f4cb2912babe%2Fqcdyjvt_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)