Write a Program: Print a table of stars and zeroes
print a square table of alternating stars and zeroes.
Ask the user to enter a size of the table. The number should be odd. Since the table is square the number of rows and columns will be the same and should be equal to the entered size. The valid range for the size is from 3 to 15, inclusive.
Use a loop to make sure the entered size is odd and within the range. Output a descriptive error message if an invalid size is entered. The error message should indicate if the size is even, or less than the minimum, or larger than the maximum.
If more than one error condition appears. Don't create separate output strings for all combinations of error conditions
Each row in said table should have ‘*’ and ‘0’ symbols separated by a space. Each column of the table should also have alternating ‘*’ and ‘0’ symbols. All corners should have the ‘*’ symbol.
Write a program to create a class called STUDENT with data members Roll
Number, Name and Age. Using inheritance, create the classes
UGSTUDENT and PGSTUDENT having fields a semester, fees and
stipend. Enter the data for at least 5 students. Find the average age for all
UG and PG students separately.
(Multipath Inheritance) Design a base class called Student with two
fields:- (i) Name (ii) roll number. Derive two classes called Sports and
Exam from the Student base class. Class Sports has a field called s_grade
and class Exam has a field called e_grade which are integer fields. Derive a
class called Results which inherit from Sports and Exam. This class has a
character array or string field to represent the final result. Also it has a
member function called display which can be be used to display the final result.Illustrate the usage of these classes in main.
Can you share an example of a simple looping application?
You are a freelance calendar maker. Unfortunately, like me, you are useless are remembering how many days there are in each month of the year.
Write a program that uses a switch statement to tell a user how many days there are in a month.
Your cases should test a number corresponding to the months (e.g. 1 = January, 12 = December), and true cases should print out how many days there are in a month.