Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Using a do while loop, write a program in C++ that can display all the odd numbers from 25 to 10 inclusively. The program should be able to display the sum of the numbers as well.


a) Write a program in C++ using repetition that is capable of displaying how many numbers from 0 to 100 that is divisible by 2 and 5.


b) Write a program in C++ using repetition that is able to determine and display the largest and the smallest number among any number of integers entered by the user.


Your task is to declare a 2D array whose dimensions should be entered by the user of the program.

• Then you should initialize the array with ones (using nested loops).

• Next you have to write a function array_multiply() which takes in the array or its pointer as argument and multiplies all its entries with a user input number. (Hint: you will also need to pass in the dimensions of the matrix to this function).

• Similarly write a function array_add() that adds a constant number to all the entries in a 2D array.

• Print the results of calling these functions. 


Write a program to define a class to input the name of a student and marks of three subjects

(s1, s2, s3), calculate the total marks and average marks in a member function of a class and also

display the output in another member function of a class. Each subject has a maximum of 100

marks.


A balloon has a volume of 4.0 L when at sea level (1.0 atm) at room temperature 0f 28 . C What will be its volume when inflated with inflated with the same amount of gas at an elevation where the atmospheric pressure is 700 mm Hg at 28 . C


Secret Message - 2

Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.

Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.

abcdefghij12345678910

klmnopqr1112131415161718

stuvwxyz1920212223242526Input

For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14".

Sample Input 1

python

Sample Output 1

16-25-20-8-15-14

Sample Input 2

Foundations

Sample Output 2

6-15-21-14-4-1-20-9-15-14-19


Ordered Matrix

Given a M x N matrix, write a program to print the matrix after ordering all the elements of the matrix in increasing order.Input


The first line of input will contain two space-separated integers, denoting the M and N.

The next M following lines will contain N space-separated integers, denoting the elements of each list.Output


The output should be M lines containing the ordered matrix.

Note: There is a space at the end of each line.Explanation


For example, if the given M is 3 and N is 3, read the inputs in the next three lines if the numbers given in the next three lines are the following.

1 20 3
30 10 2
5 11 15


By ordering all the elements of the matrix in increasing order, the ordered matrix should be

1 2 3
5 10 11
15 20 30

Sample Input 1

3 3

1 20 3

30 10 2

5 11 15

Sample Output 1

1 2 3

5 10 11

15 20 30

Sample Input 2

2 5

-50 20 3 25 -20

88 17 38 72 -10

Sample Output 2

-50 -20 -10 3 17

20 25 38 72 88




Design a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee.


(The Person, Student, Employee, Faculty, and Staff classes)


A person has a name, address, phone number, and email address. A student has a class status (freshman, sophomore, junior, or senior). Define the status as a constant. An employee has an office, salary, and date hired. A faculty member has office hours and a rank. A staff member has a title. Override the toString method in each class to display the class name and the person’s name.


Write a test program that creates a Person, Student, Employee, Faculty, and Staff, and invokes their toString() methods.


Write a java Program considering the following scenario.


•Mobile is an Object that contains basic functionalities including Calling & Receiving a call & Messaging. The Mobile has certain features including Processor, internal memory, single or dual SIM, weight. The IMEI number is only used for identifying the device.


•There can be different mobiles like Samsung, iPhone or Nokia which have their own features along with the basic functionality of a mobile phone.


•In case of Samsung, the Android version, Camera Specs and playing FM Radio, capturing photos.


•iPhone may have an ios version, Music Player, Camera.


•Any of these mobile phones can be used to make a call or send a text message.


Write a simple java program that adds two integers input by user. The program should terminate if any operand is nonnumeric. Before program exit, a message should be displayed that “Input is not valid!”.


Hint: You can use


–NumberFormatException


–InputMismatchException


--ClasscastExcception



LATEST TUTORIALS
APPROVED BY CLIENTS