NCERT Solutions for Class 10 Economics Chapter 2 – Sectors of the Indian Economy. The solutions for Chapter 2 – Sectors of the Indian Economy are given below. Students should also check NCERT Solutions for Class 10 for other subjects. Exercises Page No 35. Fill in the blanks using the correct option given in the bracket.
[F]([G] in 4th edition ) Attempt the following:(a) Any year is entered through the keyboard, write a program to determine whether the year is leap or not. Use the logical operators && and ||.
![Solutions Solutions](/uploads/1/2/7/7/127757990/208826974.jpg)
- Let Us C: Chapter 1 Solution Let Us C by YASHAVANT P. KANETKARChapter 1: Getting Started (PAGE:39). Point out the errors, if any in the following C statements: (a.
- In C, we can use the expression c = a + b; or, in assembly language, we can use add c;a;b and these instructions will be represented by a sequence of bits 001001 in the computer. Groups of bits are named as follows: bit 0 or 1 byte 8 bits half word 16 bits word 32 bits double word 64 bits.
- Show that the function is a solution to the initial value problem on the interval –c x c. Note that this solution becomes unbounded as x approaches Thus, the solution exists on the interval with, but not for larger.This illustrates that in Theorem 1 the existence interval can be quite small (if c is small) or quite large (if c is large).
click here for Answer!!!
Answer:
void main()
{
int year;
printf('Enter year: ');
scanf('%d',&year);
if((year%4)0&&(year%100)!=0||(year%400)0)
printf('%d is leap year',year); // reason at Note:1
else
printf('%d is not leap year',year);
}
(b) Any character is entered through the keyboard, write a program to determine whether the character entered is a capital letter, a small case letter, a digit or a special symbol. The following table shows the range of ASCII values for various characters.
characters ascii values
A-Z 65 – 90
a-z 97 – 122
0-9 48 – 57
special symbols 0 - 47, 58 - 64, 91 - 96, 123 - 127
click here for Answer!!!
Chapter 2let Us C Solutions Llc
Answer:
Void main()
{
char ch;
printf('Enter any character ');
scanf('%c',&ch);
if(ch>=65&&ch<=90) printf('Character entered is Capital'); else if(ch>=97&&ch<=122) printf('Character entered is small'); else if(ch>=48&&ch<=57) printf('character is digit'); else printf('Character is special symbols'); }
Chapter 2let Us C Solutions Collection Agency
(c) 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.
Write a program to output whether the person should be insured or not, his/her premium rate and maximum amount for which he/she can be insured.
click here for Answer!!!
Answer:
Void main()
{
char health,sex,area;
int age;
printf('Enter health condn(e/p),sex(m/f),area(c/v)&agen');
scanf('%c %c %c %d',&health,&sex,&area,&age);
if(health'e'&&sex'm'&&area'c'&&age>=25&&age<=35) { printf('nInsuredn'); printf('nPremium rate = Rs. 4 per 1,000n'); printf('nmaximum policy amount = Rs. 2,00,000'); } else if(health'e'&&sex'f'&&area'c'&&age>=25&&age<=35) { printf('nInsured'); printf('nPremium Rate = Rs. 3 per 1000'); printf('nMaximum policy amount = Rs. 1,00,000'); } else if(health'p'&&sex'm'&&area'v'&&age>=25&&age<=35) { printf('nInsured'); printf('nPremium Rate = Rs. 6 per 1,000'); printf('nMaximum policy amount = Rs. 10,000'); } else printf('nYou cannot be insuredn'); }
(d) A certain grade of steel is graded according to the following conditions:
(i) Hardness must be greater than 50
(ii) Carbon content must be less than 0.7
(iii) Tensile strength must be greater than 5600
The grades are as follows:
Grade is 10 if all three conditions are met
Grade is 9 if conditions (i) and (ii) are met
Grade is 8 if conditions (ii) and (iii) are met
Grade is 7 if conditions (i) and (iii) are met
Grade is 6 if only one condition is met
Grade is 5 if none of the conditions are met
Write a program, which will require the user to give values of hardness, carbon content and tensile strength of the steel under consideration and output the grade of the steel.
click here for Answer!!!
Answer:
void main()
{
float hardness,carbon,tensile;
int grade;
printf('Enter hardness,carbon content & tensile strength:');
scanf('%f %f %f',&hardness,&carbon,&tensile);
if(hardness>0&&carbon>=0&&tensile>0)
{
if(!(hardness>50&&carbon<0.7&&tensile>5600))
grade=5;
if(hardness>50||carbon<0.7||tensile>5600)
grade=6;
if(hardness>50&&tensile>5600)
grade=7;
if(carbon<0.7&&tensile>5600)
grade=8;
if(hardness>50&&carbon<0.7) grade=9; if(hardness>50&&carbon<0.7&&tensile>5600)
grade=10;
printf('nGrade = %d',grade);
}
else
printf('nYour entry is invalid');
}
(e)A library charges a fine for every book returned late. For first 5 days the fine is 50 paise, for 6-10 days fine is one rupee and above 10 days fine is 5 rupees. If you return the book after 30 days your membership will be cancelled. Write a program to accept the number of days the member is late to return the book and display the fine or the appropriate message.
Chapter 2 Let Us C Solutions
click here for Answer!!!Answer:
void main()
{
int days;
float fine;
printf('Number of days late: ');
scanf('%d',&days);
if(days<=30) { if(days<=5) fine=0.5; else if(days>5&&days<=10) fine=1.0; else if(days>10&&days<=30) fine=5.0; printf('you have to pay fine of Rs %f',fine); } else printf('Your membership has been canceled'); }
![Let us c solutions 5th edition chapter 2 Let us c solutions 5th edition chapter 2](/uploads/1/2/7/7/127757990/483039412.jpg)
Chapter 2let Us C Solutions Inc
click here for Answer!!!
Answer:
void main()
{
int side1,side2,side3;
printf('Enter 3 sides of triangle: ');
scanf('%d%d%d',&side1,&side2,&side3);
if(side1>side2&&side1>side3)//case for side1 greater
{
if(side1<(side2+side3))//long side is side1 { printf('ntriangle is valid '); } else printf('n triangle is invalid'); } if(side2>side1&&side2>side3) //case for side2 greater
{
if(side2<(side1+side3)) { printf('ntriangle is valid '); } else printf('n triangle is invalid'); } if(side3>side1&&side3>side2) //case for side3 greater
{
if(side3<(side1+side2)) { printf('ntriangle is valid '); } else printf('n triangle is invalid'); } }
(g)If the three sides of a triangle are entered through the keyboard, write a program to check whether the triangle is isosceles, equilateral, scalene or right angled triangle.
click here for Answer!!!
Answer:
void main()
{
int side1,side2,side3,h;
printf('Enter 3 sides of triangle: ');
scanf('%d%d%d',&side1,&side2,&side3);
if(side1side2&&side1side3)//for equilateral
{
printf('nEquilateral triangle ');
}
//for isosceles
else if(side1side2||side2side3||side1side3)
{
printf('ntriangle is isoscelses ');
}
//for scalene
else if(side1!=side2&&side2!=side3&&side1!=side3)
printf('n triangle is scalene');
if(side1>side2&&side1>side3) //case for side1 greater
{
h=sqrt(side2*side2+side3*side3);
//note1: see about pythagoream theorem
if(side1h)//Pythagoream Theorem condition check
printf('ntriangle is right angled triangle');
else
printf('ntriangle is not right angled triangle');
}
else if(side2>side1&&side2>side3) //case for side2 greater
{
h=sqrt(side1*side1+side3*side3);
if(side2h)//Pythagoream Theorem condition check
printf('ntriangle is right angled triangle');
else
printf('ntriangle is not right angled triangle');
}
else if(side3>side1&&side3>side2) //case for side3 greater
{
h=sqrt(side1*side1+side2*side2);
if(side3h)//Pythagoream Theorem condition check
printf('ntriangle is right angled triangle');
else
printf('ntriangle is not right angled triangle');
}
}
(h) In a company, worker efficiency is determined on the basis of the time required for a worker to complete a particular job. If the time taken by the worker is between 2 – 3 hours, then the worker is said to be highly efficient. If the time required by the worker is between 3 – 4 hours, then the worker is ordered to improve speed. If the time taken is between 4 – 5 hours, the worker is given training to improve his speed, and if the time taken by the worker is more than 5 hours, then the worker has to leave the company. If the time taken by the worker is input through the keyboard, find the efficiency of the worker.
click here for Answer!!!
Answer:
void main()
{
float time;
printf('Enter time taken to complete work: ');
scanf('%f',&time);
if(time>=2&&time<=3) printf('nWorker is highly efficient'); else if(time>3&&time<=4) printf('nWorker is ordered to improve speed'); else if(time>4&&time<=5) printf('nWorker has to given a training'); if(time>5)
printf('Worker has to leave the company');
}
(i) A university has the following rules for a student to qualify for a degree with A as the main subject and B as the subsidiary subject:
(a) He should get 55 percent or more in A and 45 percent or more in B.
(b) If he gets less than 55 percent in A he should get 55 percent or more in B. However, he should get at least 45 percent in A.
(c) If he gets less than 45 percent in B and 65 percent or more in A he is allowed to reappear in an examination in B to qualify.
(d) In all other cases he is declared to have failed.
Write a program to receive marks in A and B and Output whether the student has passed, failed or is allowed to reappear in B.
click here for Answer!!!
Answer:
void main()
{
int pera,perb;
printf('Enter percent in A and B: ');
scanf('%d%d',&pera,&perb);
if(pera>=55&&perb>=45)
printf('n Student is passed');
else if(pera>=45&&pera<55&&perb>=55)
printf('n Student is passed');
else if(perb<45&&pera>=65)
printf('Student is allowed to reappear in an exam');
else
printf('Student is failed');
}
(j) The policy followed by a company to process customer orders is given by the following rules:
(a) If a customer order is less than or equal to that in stock and has credit is OK, supply has requirement.
(b) If has credit is not OK do not supply. Send him intimation.
(c) If has credit is Ok but the item in stock is less than has order, supply what is in stock. Intimate to him data the balance will be shipped.
Write a C program to implement the company policy
click here for Answer!!!