develop a c++ program to create a cake class. include two public fields that contain the price of the cake and the calorie count of the cake. write a main () function that declares a cake object. prompt the user for field values. print the values, and then display the cost per calorie.
Write a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the number, the operator and the result. (For division, if the denominator is zero, output an appropriate message). CODING C#
the goal of this coding exam is to quickly get you of the ground with this in the object methods
tax criteria
salary tax percentage
>= 50000 5
>= 1000000 10
quick tip
tax = salary * taxPercentage/100
input 1
stuart
developer
840000
output 1
42000
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
const name = readLine();
const role = readLine();
const salary = JSON.parse(readLine());
function Employee(name, role, salary) {
// Write your code here
}
const employee1 = // Write your code here
/* Please do not modify anything below this line */
console.log(employee1.getTaxAmount());
}
write a program that determines whether an input number is an
integer or a real number.
Write a program that would print the information (name, year of joining, salary, address) of three employees by creating a class named 'Employee'. The output should be as follows:
Name Year of joining Address
Robert 1994 64C- WallsStreat
Sam 2000 68D- WallsStreat
John 1999 26B- WallsStreat
At a particular point in a structural member a two dimensional stress system exists where sigma x=60N/mm^2 sigma y=-40N/mm^2 and shear stress (xy) =50N/mm^2 if young's modulus =200000N/mm^2 and poisson's ratio =0.3 calculate the direct strain in the x and y directions and the shear strain at the point.
The population of a town A is less than the population of town B.However, the population of
algorithmoutputs after how many years the population of town A will be greater than or equal to
flowchartthat prompts the user to enter the population and growth rate of each town. The
Population of town A =5000, growth rate of town A = 4%, populationof town B = 8000, and
town A is growing faster than the population of town B. Write algorithm usingpseudocodeand
the population of town B and the populations of both the towns at that time. (A sample input is:
growth rate of town B =2%)
Write a program that mimics a calculator. The program should take as input two integers and the
operation to be performed. It should then output the number, the operator and the result. (For division,
if the denominator is zero, output an appropriate message).
Take input of your registration number(8-digits) in the University. Write a program to print all the prime numbers digits in your registration number
Summary: Given integer values for red, green, and blue, subtract the gray from each value.
Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray).
Given values for red, green, and blue, remove the gray part.
Ex: If the input is:
130 50 130the output is:
80 0 80Find the smallest value, and then subtract it from all three values, thus removing the gray.
Note: This page converts rgb values into colors.