Skip to Main Content
Programming and Data Structures
book

Programming and Data Structures

by Ashok Kamthane
August 2009
Intermediate to advanced content levelIntermediate to advanced
604 pages
21h 39m
English
Pearson India
Content preview from Programming and Data Structures
94 Programming and Data Structures
if(a<c)
smallest=a;
else
smallest=c;
I
else
I
if(b<c)
smallest ^b;
else
smallest =c;
I
printf (“The smallest of% d %d %d is %d \n", a,b,c, smallest);
getcheO;
OUTPUT : Enter Three Numbers : 1 5 8
The smallest of 1 5 8 is
Explanation The logic in the above program is same as the last one. Instead of > (greater than) <
(less than) condition is used.
5.14 Write a program to calculate gross salary for the conditions given below.
BASIC SALARY (RS.) DA(RS.) HRA(RS.) CONVEYANCE(RS.)
>=5000 110% of Basic 20% of Basic 500
bs=>3000 && bs<5000 100% of Basic 15% of Basic 400
bs<3000 90% of Basic 10% OF Basic 300
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Data Structures and Algorithms

Learning Data Structures and Algorithms

Rod Stephens
Data Structures and Algorithms in C++, Second Edition

Data Structures and Algorithms in C++, Second Edition

Michael T. Goodrich, Roberto Tamassia, David M. Mount

Publisher Resources

ISBN: 9789332506343