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

eate a class Counting Machine to count number of currency value for the given amount. Design a program which accepts amount as integer and display total number of Notes of Rs. 500, 100, 50, 20, 10, 5 and 1.


You need to find which digit occurs most number of times across the four given input numbers.

input1, input2, input3 and input4 are the four given input numbers.

The program is expected to find and print the most frequent digit.

Example1 –

If input1=123, input2=234, input3=345, input4=673

We see that across these four numbers,

1, 5, 6 and 7 occur once,

2 and 4 occur twice, and

3 occurs four times.

Therefore, 3 is the most frequent digit and so the program must print 3

NOTE: If more than a digit occurs the same number of most times, then the highest of those digits should be the result. Below example illustrates this.

Example2 –

If input1=123, input2=456, input3=345, input4=5043

We see that

0, 1, 2 and 6 occur once, and

3, 4 and 5 occur thrice.

As there are three digits (3, 4 and 5) that occur most number of times, the result will be the highest (max) digit out of these three. Hence, the result should be 5


Define a class Batsman with the following specifications:


Private members:


bcode 4 digits code number bname 20 characters innings, notout, runs integer type batavg it is calculated according to the formula – batavg =runs/(innings-notout) calcavg() Function to compute batavg


Public members:


readdata() Function to accept value from bcode, name, innings, notout and invoke the function calcavg(). displaydata() Function to display the data members


Define a class Batsman with the following specifications:


Private members:


bcode 4 digits code number bname 20 characters innings, notout, runs integer type batavg it is calculated according to the formula – batavg =runs/(innings-notout) calcavg() Function to compute batavg


Public members:


readdata() Function to accept value from bcode, name, innings, notout and invoke the function calcavg(). displaydata() Function to display the data members.


Declare a class Fixed_Deposit with member variables are principal, rate and time, and member functions are MaturityAmount() to calculate the compound interest and maturity amount, and display() to print the total maturity amount(principal+compound interest).


    The table given below shows the list of gases, liquids and solids. By entering the substances, find the state of the material. Implement the above logic through C++.

S.No.

Materials

      1

Water

      2

Oxygen

      3

Gold

      4

Ice

      5

Petrol

Write a program that uses input to prompt a user for their name and then welcomes them


Enter your name: Mira

Hello Mira


String Slicing

Given two strings

inputString and subString as inputs, write a JS program to slice the inputString if it includes the subString. Slice the inputString starting from the subString to the end of the inputString.
Input

  • The first line of input contains a string inputString
  • The second line of input contains a string subString

Output

  • The output should be a sliced string or inputString (if the inputString does not include the subString)


function main() {

 let inputString = readLine();

 const subString = readLine();

  

 /* Write your code here */

  

}


i want code in between write code here


Create a program that will accept number of passengers and distance from point of origin to destination. Calculate the expense of the passenger if the fare is P20.00 per kilometer.


sample output:

passenger count: 5

distance :2

total fare is : P200.00


Create a program that will accept number of passengers and distance from point of origin to destination. Calculate the expense of the passenger if the fare is P20.00 per kilometer.


LATEST TUTORIALS
APPROVED BY CLIENTS