SlideShare a Scribd company logo
1 of 2
Download to read offline
SUNAWAR KHAN 1
Q1: A certain grade of steel is graded according to the following conditions:
(1) Hardness must be greater than 50.
(2) Carbon contents must be less than 0.7.
(3) Tensile strength must be greater than 500.
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 condition (ii) and (iii) are met.
Grade is 7 if condition (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 harness, carbon content and
tensile strength of the steel under consideration and output the grade of the steel.
Q2: Any character is entered through the keyboard; write a program to determine whether the
character entered is a capital letter, a small letter, a digit or a special symbol.
The following table shows the range of ASCII values for various characters:
Characters ASCII Values
A-Z
a-z
0-9
special symbols
65-90
97-122
48-57
0-47, 58-64, 91-96, 123-127
------------------------------------------------------------------------------------------------------------
Q3: An insurance company follows following rules to calculate premium.
(a) 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.
(b) 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.
(c) 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.
(d) In all other case the person is not ensured.
Write a program which will ask you to enter the person’s health, sex, age and policy amount.
If the policy amount do not exceed the limit then it will calculate the premium of the person
according to above given criteria otherwise says that policy amount exceeds the limit.
SUNAWAR KHAN 2
Note: Now here you cannot enter the complete word, like ‘Excellent’ you have to just enter
the first word of Excellent i.e. E or e whatever you like.
You can see the behavior of a program by entering the full word like ‘Excellent’, then it
will not ask you the remaining inputs because it will take the input from the remaining word
of Excellent word.
The above program works with a full word because they have only the single output while
this program takes the multiple outputs.
------------------------------------------------------------------------------------------------------------
Q4: A Company estimates salary of any job holder as
I) If basic pay is less then 1500, company provides house rent allowance @ 10%,
dearness allowance@20%, tearness allowance@50%.
II) If basic pay is greater then or equal to 1500, company provides house rent
allowance @ 50%, dearness allowance@23.3%, tearness allowance@50%,adhac
allowance@30%.
Write a program that input salary of any job holder and calculate his total salary.
------------------------------------------------------------------------------------------------------------
Q5: Write a program that input five digit numbers and find its reverse. Determine that input number
is equal to reverse number or not?
------------------------------------------------------------------------------------------------------------
Q 6: Any year entered through the keyboard. Write a program to determine whether the year is
leap year or not. Use the logical operator && and ||?
------------------------------------------------------------------------------------------------------------
Q 7: 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 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?
------------------------------------------------------------------------------------------------------------
Q 8: Write a program that input converts ASCII number to character and vice versa. The program
should display the following menu.
1. Convert ASCII Value to Character
2. Convert Character to ASCII Value
------------------------------------------------------------------------------------------------------------
Q 9: Write a program that convert MILITARY TIME to STANDARD TIME?
------------------------------------------------------------------------------------------------------------
Q10: Write a program in which the user get working time (hours, minutes & seconds) of employee
5 times and finally determines the longest time duration of working hours.

More Related Content

Similar to Steel Grade Calculator

You can use a calculator to do numerical calculations. No graphing.docx
You can use a calculator to do numerical calculations. No graphing.docxYou can use a calculator to do numerical calculations. No graphing.docx
You can use a calculator to do numerical calculations. No graphing.docxjeffevans62972
 
Ignou mba solved assignments june 2017
Ignou mba solved assignments june 2017Ignou mba solved assignments june 2017
Ignou mba solved assignments june 2017solved_assignments
 
CETMaharastra-2007(Q
CETMaharastra-2007(QCETMaharastra-2007(Q
CETMaharastra-2007(QJitesh Sheth
 
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docxFinal Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docxcharlottej5
 
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docxFinal Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docxlmelaine
 
Bba solved assignmnets call us at - 08263069601
Bba solved assignmnets   call us at - 08263069601Bba solved assignmnets   call us at - 08263069601
Bba solved assignmnets call us at - 08263069601smumbahelp
 
List of programs to practice for ICSE
List of programs to practice for ICSEList of programs to practice for ICSE
List of programs to practice for ICSEMokshya Priyadarshee
 
Mb0040 statistics for management {e slm}-de
Mb0040 statistics for management {e slm}-deMb0040 statistics for management {e slm}-de
Mb0040 statistics for management {e slm}-depkharb
 

Similar to Steel Grade Calculator (10)

You can use a calculator to do numerical calculations. No graphing.docx
You can use a calculator to do numerical calculations. No graphing.docxYou can use a calculator to do numerical calculations. No graphing.docx
You can use a calculator to do numerical calculations. No graphing.docx
 
Ignou mba solved assignments june 2017
Ignou mba solved assignments june 2017Ignou mba solved assignments june 2017
Ignou mba solved assignments june 2017
 
Kanban - Birlasoft : Master Service Provider
Kanban - Birlasoft : Master Service ProviderKanban - Birlasoft : Master Service Provider
Kanban - Birlasoft : Master Service Provider
 
CETMaharastra-2007(Q
CETMaharastra-2007(QCETMaharastra-2007(Q
CETMaharastra-2007(Q
 
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docxFinal Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
 
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docxFinal Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
Final Exam, Introductory Macroeconomics (Econ 2) Winter 2019.docx
 
Bba solved assignmnets call us at - 08263069601
Bba solved assignmnets   call us at - 08263069601Bba solved assignmnets   call us at - 08263069601
Bba solved assignmnets call us at - 08263069601
 
Mysqlbyjp
MysqlbyjpMysqlbyjp
Mysqlbyjp
 
List of programs to practice for ICSE
List of programs to practice for ICSEList of programs to practice for ICSE
List of programs to practice for ICSE
 
Mb0040 statistics for management {e slm}-de
Mb0040 statistics for management {e slm}-deMb0040 statistics for management {e slm}-de
Mb0040 statistics for management {e slm}-de
 

More from International Islamic University (20)

Hash tables
Hash tablesHash tables
Hash tables
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Graph 1
Graph 1Graph 1
Graph 1
 
Graph 2
Graph 2Graph 2
Graph 2
 
Graph 3
Graph 3Graph 3
Graph 3
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Quick sort
Quick sortQuick sort
Quick sort
 
Merge sort
Merge sortMerge sort
Merge sort
 
Linear timesorting
Linear timesortingLinear timesorting
Linear timesorting
 
Facial Expression Recognitino
Facial Expression RecognitinoFacial Expression Recognitino
Facial Expression Recognitino
 
Lecture#4
Lecture#4Lecture#4
Lecture#4
 
Lecture#2
Lecture#2 Lecture#2
Lecture#2
 
Case study
Case studyCase study
Case study
 
Arrays
ArraysArrays
Arrays
 
Pcb
PcbPcb
Pcb
 
Data transmission
Data transmissionData transmission
Data transmission
 
Basic organization of computer
Basic organization of computerBasic organization of computer
Basic organization of computer
 
Sorting techniques
Sorting techniquesSorting techniques
Sorting techniques
 
Linear search-and-binary-search
Linear search-and-binary-searchLinear search-and-binary-search
Linear search-and-binary-search
 

Recently uploaded

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 

Recently uploaded (20)

Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 

Steel Grade Calculator

  • 1. SUNAWAR KHAN 1 Q1: A certain grade of steel is graded according to the following conditions: (1) Hardness must be greater than 50. (2) Carbon contents must be less than 0.7. (3) Tensile strength must be greater than 500. 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 condition (ii) and (iii) are met. Grade is 7 if condition (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 harness, carbon content and tensile strength of the steel under consideration and output the grade of the steel. Q2: Any character is entered through the keyboard; write a program to determine whether the character entered is a capital letter, a small letter, a digit or a special symbol. The following table shows the range of ASCII values for various characters: Characters ASCII Values A-Z a-z 0-9 special symbols 65-90 97-122 48-57 0-47, 58-64, 91-96, 123-127 ------------------------------------------------------------------------------------------------------------ Q3: An insurance company follows following rules to calculate premium. (a) 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. (b) 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. (c) 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. (d) In all other case the person is not ensured. Write a program which will ask you to enter the person’s health, sex, age and policy amount. If the policy amount do not exceed the limit then it will calculate the premium of the person according to above given criteria otherwise says that policy amount exceeds the limit.
  • 2. SUNAWAR KHAN 2 Note: Now here you cannot enter the complete word, like ‘Excellent’ you have to just enter the first word of Excellent i.e. E or e whatever you like. You can see the behavior of a program by entering the full word like ‘Excellent’, then it will not ask you the remaining inputs because it will take the input from the remaining word of Excellent word. The above program works with a full word because they have only the single output while this program takes the multiple outputs. ------------------------------------------------------------------------------------------------------------ Q4: A Company estimates salary of any job holder as I) If basic pay is less then 1500, company provides house rent allowance @ 10%, dearness allowance@20%, tearness allowance@50%. II) If basic pay is greater then or equal to 1500, company provides house rent allowance @ 50%, dearness allowance@23.3%, tearness allowance@50%,adhac allowance@30%. Write a program that input salary of any job holder and calculate his total salary. ------------------------------------------------------------------------------------------------------------ Q5: Write a program that input five digit numbers and find its reverse. Determine that input number is equal to reverse number or not? ------------------------------------------------------------------------------------------------------------ Q 6: Any year entered through the keyboard. Write a program to determine whether the year is leap year or not. Use the logical operator && and ||? ------------------------------------------------------------------------------------------------------------ Q 7: 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 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? ------------------------------------------------------------------------------------------------------------ Q 8: Write a program that input converts ASCII number to character and vice versa. The program should display the following menu. 1. Convert ASCII Value to Character 2. Convert Character to ASCII Value ------------------------------------------------------------------------------------------------------------ Q 9: Write a program that convert MILITARY TIME to STANDARD TIME? ------------------------------------------------------------------------------------------------------------ Q10: Write a program in which the user get working time (hours, minutes & seconds) of employee 5 times and finally determines the longest time duration of working hours.