Switch statement, Continue statement Break statement, Goto statement
Explain Nested Structure. Write a program using nested structure to create an Array of structure to store the details of N students.
The details are,
1. Student name
2. Student roll no
3. Marks of Physics, Chemistry, Maths.
Calculate total of P-C-M. Display the data in the format
Name Roll no Total marks
An electronic component vendor supplies three products: transistors, resistors and capacitors. The vendor gives a discount of 10% on order of transistor if the order is more than Rs. 1000. On order of more than Rs. 100 for resistors, a discount of 5% is given and discount of 10% is given on order for capacitors of value more than Rs. 500. Assume numeric code 1, 2 and 3 used for transistors, capacitors and resistors respectively. Write a program that reads the product code and order amount and prints out the net amount that the customer is required to pay after discount. (Note: Use switch-case)