answersLogoWhite

0

Write a program which takes the gender and salary ,the age from user. the program should calculate and display the following information.

i. If gender is male and age is greater >=18,then the tax =5%of the salary.

ii. If gender is female and age is >=18,then tax=3%of salary.

The program should display the output as follows:

Gender =

Age =

Tax =

Salary before tax =

Salary after tax =

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How do you calculate gate valve sizes for pipelines?

the gate value size should be greater than size of pipe .


How do you design an If-Then statement or a flowchart with a single alternative decision structure that assigns 20 to the variable y and 40 to the variable z if the variable x is greater than 100?

Design an If-Then statement (or a flowchart with a single alternative decision structure) that assigns 0 to the variable b and assigns 1 to the variable c if the variable a is less than 10. Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b. The following pseudocode contains several nested If-Then-Else statements. Unfortunately, it was written without proper alignment and indentation. Rewrite the code and use the proper conventions of alignment and indentation. If score < 60 Then Display "Your grade is F." Else If score < 70 Then Display "Your grade is D." Else If score < 80 Then Display "Your grade is C." Else If score < 90 Then Display "Your grade is B." Else Display "Your grade is A." Design nested decision structures that perform the following: If amount1 is greater than 10 and amount2 is less than 100, display the greater of amount1 and amount2. Rewrite the following If-Then-Else If statement as a Select Case statement. If selection == 1 Then Display "You selected A." Else If selection == 2 Then Display "You selected 2." Else If selection == 3 Then Display "You selected 3." Else If selection == 4 Then Display "You selected 4." Else Display "Not good with numbers, eh?" End If Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that displays “Speed is normal” if the speed variable is within the range of 24 to 56. If speed holds a value outside this range, display “Speed is abnormal.” Design an If-Then-Else statement (or a flowchart with a dual alternative decision structure) that determines whether the points variable is outside the range of 9 to 51. If the variable holds a value outside this range it should display “Invalid points.” Otherwise, it should display “Valid points.” Design a case structure that tests the month variable and does the following: If the month variable is set to 1, it displays “January has 31 days.” If the month variable is set to 2, it displays “February has 28 days.” If the month variable is set to 3, it displays “March has 31 days.” If the month variable is set to anything else, it displays “Invalid selection.” Write an If-Then statement that sets the variable hours to 10 when the flag variable minimum is set. End If End If End If End If


Why scope frequency is always greater then signal frequency in the oscilloscope?

In the course of sampling a signal to graph the parts of a repeating event on the display, the sampling must be done faster than the event you want to graph. If the sampling is done slower than the event then you will be displaying several parts of the event in a single dot on the display, highly inaccurate. The signal sampling must be done fast enough to display the event in enough detail. The higher you set the scope frequency, the wider the event appears on the display, possibly losing the sides of the event if you go too high.


What are the advantages and disadvantages of double over float?

Advantages: Stores more information with greater precision. Disadvantages: Takes up twice the amount of memory.


Why efficiency of carnot heat engine is always greater than that of an actual engine?

The efficiency of a Carnot engine is theoretically always greater than that of an actual engine. The fact that it is impossible to build a thermodynamically reversable engine, which is one of the variables necessary to calculate its superiority to a real heat engine, makes the theorum practical for assessing a real heat engines efficiency only.

Related Questions

When bearing is greater than 180 how to calculate back bearing?

when bearing is greater than 180 In order to calculate back bearing subtract bearing from 360


How do you Draw a flowchart to display the highest of any 10 numbers entered?

The basic idea is as follows. Assume an array n(), of ten elements.* Set variable "highest" to the first number, n(1). * Set index "i" equal to 2. * Do the following in a loop: * If n(i) is greater than "highest", replace "highest" with n(i). * Increment i by 1. * Compare whether "i" is greater than 10. If it is, leave the loop. * Display variable "highest".


Which of the following would result in an increase in GDP apex?

Greater levels of iinvestment


When discussing the ISR collection plan the following statement would represent which factor of specific collection assets Is the risk of loss greater than the potential gain of information?

Vulnerability


Which one is greater 33 or 330?

Without further information, 330 is greater.


Which of the following measurements is greater than 1 yard?

a mile


Is 4 greater than 7?

If you want to ask questions about the "following", then I suggest that you make sure that there is something that is following.


What is rack policy?

In a travel agency, any conscious decision regarding how to display suppliers' brochures on a display stand, or "rack." For example, an agency may decide not to display the brochures of certain suppliers or give certain destinations greater exposure.


Write a program that will accept two numbers and find their sum anddifferences. If the sum is more than the difference, display the sum otherwisedisplay the difference. Pascal programming?

program SumAndDifference; var num1, num2, sum, difference: integer; begin write('Enter first number: '); read(num1); write('Enter second number: '); read(num2); sum := num1 + num2; difference := num1 - num2; if sum > difference then written('The sum is greater: ', sum) else written('The difference is greater: ', difference); end. This program will prompt the user to enter two numbers, calculate their sum and difference, and then compare the two values. If the sum is greater than the difference, it will display the sum; otherwise, it will display the difference.


Which of the following is one effect that globalization has had on the labor market in the United States?

The question is incomplete. There are no options given (for "which of the following") to answer this question.


What is following comparison operator means greater than or equal to?

>= is the comparison operator that means greater than or equal to.


What is the answer to the following question - 'Is 56 greater less or equal to 7'?

The (grammatically correct) answer is "56 is greater than 7."