Write a program in C++ to accept date in dd:mm:yyyy format. Store these values in MyDate Class with members as day, month and year. Convert this date into one variable “Duration” of the current years. This duration means number of days passed in the current year since Jan 1.
Hint :Use type conversion method from class type to basic type conversions.
Note: consider days in February as 28 for all years.
Output expected:
Enter Date : 05:04:2021
No of days since Jan 1 of the current year : 90
Create a program that will compute the prelim, midterm, final grades of the students. The program will input grades for quiz, recitation, project, and exam rating. The class standing, the class average and the prelim, midterm and final grades will be computed and displayed automatically. Display also the grade equivalent and if the grade of the student is greater than 75 then the remark will be “Passed” otherwise “Failed” Use any selection and repetition structures. Use these formulas:
PRELIM:
CS = (Q + R) / 2
PROJECT = P* 40%
LECTURE = ((2 * CS + ER) / 3) * 60%
PG = PROJECT + LECTURE
MIDTERM:
CSM = (QM + RM) / 2
MPROJECT = PM * 40%
MLECTURE = (2*CSM + MER) / 3 * 60%
CAM = MPROJECT + MLECTURE
MG = (2 * CAM + PG) / 3
FINALS:
CSF = (QF + RF) / 2
FPROJECT = PF * 40%
FLECTURE = ((2 * CSF + PER) / 3 * 60%
CAF = FPROJECT + FLECTURE
FG = (2*CAF+MG) / 3
Write a program that defines the named constant PI, const double
PI = 3.14159;, which stores the value of p. The program should use PI
and the functions listed in Table 6-1 to accomplish the following:
a. Output the value of Pi Output the value of Pi.
b. Prompt the user to input the value of a double variable r, which stores the radius of a sphere. The program then outputs the following:
i. The value of 4Pir2, which is the surface area of the sphere.
ii. The value of (4/3)Pir3, which is the volume of the sphere
. Write a value-returning function, isVowel, that returns the value true if a given character is a vowel and otherwise returns false.
Write a program that takes a number from the user and pass that number to a user defined function. The function displays the table of that number. (
Write a program that will sort a list of strings (names of person) enter by the user given the value of n names.
Suppose we have the following student table in database. You have to write:
Form load event to show all records in grid view when you run the application.
Event handler for “Semester 6 th Student” button to shows all those students’ data in grid view that has semester value 6 and gpa value is greater than or equal to 3.
How do i convert a decimal into a fraction using a fraction reader and file with decimals
Write a program in C++ to open and read the contents of the Text1.txt using the file stream class.
Close the file and again open to update the contents of given file Text1.txt.
Text1.txt : I am enjoying learning OOPS concepts
After update
Text1.txt: I am enjoying learning OOPS concepts
Now learnt C++; Java is my next target.