Write a C++ program to make a structure of a student consisting of integer age, char name and structure roll number that further divides into department, session, registration number and degree. Set and display all the values from main function and display the record on screen to present the access of structure within structure. You have to by access structure using pointer type variable of structure
1. Two fair cubes are rolled. The random variable X represents the difference between the values of the two cubes.
a) Find the mean of this probability distribution. (i.e. Find E[X])
Anil is given a sentence as he tries to make a sentence special a sentence can be made special by swapping the character with high frequency with the character character has low frequency in the sentence help anil by transforming the sentence into a special sentence in python
swap most frequent letter with least given a sentence swap the occurences of the most frequent with the least frequent letter and vice-versa
note: consider upper & lower case letters as different .if there are multiple letters with the same frequencies choose the lower case letter that comes earliest in dictionary order O
input: Python is a programming language
o/p: Python is e progremming lenguega
input: Check your blood preeusre frequently
o/p: Check ybur olbbd preeusre frequently
write a java program that enters students names, test 1, test 2, test 3 scores and calculate average for each student " use arrays"
You will be given two integers x and y as input, you have to compute x/y . If x and y are not integers or if y is zero, exception will occur and you have to report it. You should use try and catch blocks to handle the exception. You also have to include a finally block to show output "Output from finally block". Read sample Input/Output to know what to report in case of exceptions.
10
3
3
Output from finally block
10
Hello
Check your input: java.util.InputMismatchException
Output from finally block
10
Value is undefined: java.lang.ArithmeticException: / by zero
Output from finally block
23.323
Check your input: java.util.InputMismatchException
Output from finally block
Write a function in C++ to calculate and return the roots of a quadratic equation ax2 + bx + c = 0.
Return x1 and x2 through
parameter of the function. The prototype of this function is defined by:
void solveEquation(int a, int b, int c, float *x1, float *x2);
Write a function in C++ program to exchange two numbers.
These two variables are passed through parameters of the
function using pointer. void exchange(int *a, int *b)
Print a welcome message to the screen as follows:
We bid welcome to the ladies of Beauxbaton and our friends from the north, the sons of Durmstrang.
Q: Write a program that displays the following menu to the user:
Press 1 for Permanent Employee
Press 2 for Daily wages Employee
After selecting the appropriate employee calculate salary for the employees.
The daily wages employees are paid 400 per hour while permanent employees are paid 800 per hour. First you need to ask for the number of hours for which the employee has worked so far and then calculate and display the salary of each type of employee.
Perform the above-mentioned task using switch statement.
Your task is to implement this:
• A member variable that will hold the annual interest rate of the loan. Its default value will be 2.5.
• A member variable that will hold the number of years for the loan. Its default value will be 1.
• A member variable that will hold the loan amount. Its default variable will be 1000.
• A default constructor.
• Another constructor that has interest rate, years, and loan amount as its parameters.
• A member function that returns the annual interest rate of this loan.
• A member function that returns the number of the years of this loan.
• A member function that returns the amount of this loan.
• A member function that returns the monthly payment of this loan.
• A member function that returns the total payment of this loan.
Enter yearly interest rate, for example 8.25: 10
Enter number of years as an integer, for example 5: 5
Enter loan amount, for example 120000.95: 300000
The monthly payment is 6374.11
The total payment is 382446.80