Chapter 2 Remaining Programslet Us C Solutions



Chapter 2 Remaining Programslet Us C SolutionsSolutions

Chapter 2 Remaining Programslet Us C Solutions Act

Chapter

Chapter 2 Remaining Programslet Us C Solutions Llc

Question-An Insurance company follows following rules to calculate premium.
(1) If a person’s health is excellent and the person is between 25 and 35 years of age and lives in a city and is a male then the premium is Rs. 4 per thousand and his policy amount cannot exceed Rs. 2 lakhs.
(2) If a person satisfies all the above conditions except that the sex is female then the premium is Rs. 3 per thousand and her policy amount cannot exceed Rs. 1 lakh.
(3) If a person’s health is poor and the person is between 25 and 35 years of age and lives in a village and is a male then the premium is Rs. 6 per thousand and his policy cannot exceed Rs. 10,000.
(4) In all other cases the person is not insured.
Solution- Honestly speaking ,these type of questions are really boring. Here is the solution.
#include<stdio.h>
int main()
{
int health,age,gender,residence;
printf('Enter your info. Health(Excellent=1,poor=0),age(25-35=1 ,else=0),gender(Male=1,female=0),residense info.(Rural=1,urban=0)n');
scanf('%d%d%d%d',&health,&age,&gender,&residence);
if(health1&&age1&&gender1&&residence0)
printf(' premium is Rs. 4 per thousand and his policy amount cannot exceed Rs. 2 lakhsn');
else if (health1&&age1&&gender0&&residence0)
printf('premium is Rs. 3 per thousand and her policy amount cannot exceed Rs. 1 lakhn');
else if(health1&&age1&&gender0&&residence1)
printf('premium is Rs. 6 per thousand and his policy cannot exceed Rs. 10,000n');
else
printf('Person can not be insuredn');
return 0;
}
/* We can write all condition together using || but it would difficult to read so i prefer this way */

Chapter 2 Remaining Programslet Us C Solutions Inc

Question: Quiz: Chapter 2 Quiz Time Remaining: 01:04:41 Submit Quiz This Question: 1 Pt 10 Of 25 (8 Complete) This Quiz: 25 Pts Possible Which Of The Following Components Of An Information System Are The MOST Difficult To Change And Result In The MOST Amount Of Organizational Disruption? Data And Hardware OB. Data And Procedures O C. (c) Material P with resistivity 2.3 X 10 3 ohm-m can be used for making solar cell because it is a semiconductor. Question 35 The electrical resistivites of four materials A, B, C and D are given below.