26. Suppose that the tuition for a university is $10,000 this year and Write a program that computes the tuition in ten years and the total cost of four years"
increases 5% every year.
worth of tuition starting ten years from now. 27. Write a program that convert from kilograms to pounds, miles to kilometers, and from
hour to minutes based on the choice of the user. 28. Write a program that prompts the user to enter the number of students and each student's
name and score, and finally displays the student with the highest score and the student
with the second-highest score.
29. Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the name of the student with the highest score.
2. Write a float method triangle() that computes the area of a triangle using its two formal parameters h and w, where h is the height and w is the length of the bases of the triangle.
3. Write a float method rectangle() that computes and returns the area of a rectangle using its two float formal parameters h and w, where h is the height and w is the width of the rectangle.
4. The formula for a line is normally given as y= mx +b. Write a method Line() that expects three float parameters, a slop m, a y-intercept b, and an x-coordinate x. the method computes the y-coordinate associated with the line specified by m and b at x coordinate.
5. Write a method Intersect() with four float parameters m1.b1.m2,b2. The parameters come conceptually in two pairs. The first pair contains the coefficients describing one line; the second pair contains coefficients describing a second line. The method returns I
if the two lines intersect. Otherwise, it should return 0;
Creat a class called class1 and class2 which each of having one private data members .Add member function to set value say 'set value' on each class. Add one more function max() that is friendly to both classes and max() function should compare two private member of two classes and show maximum among them
write c++ program using a dynamic arrays to assign seats to pessenger
Example:
Base integer = 3
Initial factor = 2
Number of times to process = 3
Process:
1.) 2 x 3 = 6
2.) 6 x 3 = 18
3.) 18 x 3 = 54
Therefore, the output would above would be 54.
Instructions:
Jackpot!
by CodeChum Admin
Did you know that in lotteries, a 3-digit number with the same numbers in all digits like 777 will hit the jackpot in a casino? In the same manner, let's make a program that will test if a certain 3-digit number hits a jackpot or not by identifying if all the digits of a given number is the same as the second inputted number. If it is, print "Jackpot!"; else, print "Nah".
Let's try this out now!
Input
A line containing two integers separated by a space.
777·7
Output
A line containing a string.
Jackpot!
Write a program that prints all the uppercase characters of the ASCII character table. Display 5 characters per line. Characters are separated by exactly one space.
Suppose that the rent for an apartment is $1000 per month this year and increases 3% every year. Write a C++ program that computes the rent in five years and the total rent for one year starting five years from now
Samurais are so awesome! I'd like to imitate their amazing sword skills some time but I just don't have the courage to harm myself, so I'd just like to print out three forward slashes (\) to digitally imitate the samurai's triple slash skill. Haha!
Sounds easy, right? Then code it now!
Output
Three lines with a single forward slash symbol.