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
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.
calculate the total amount of money paid in by (n)number of student using flochart
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. The image is the sample output. Attach the screenshot of your code.
Passenger count: 5
Distance: 2
Total fare is : (peso sign) 200.00