Temperature Conversion
You are given the temperature T of an object in one of Celsius, Fahrenheit, and Kelvin scales. Write a program to print T in all scales viz Celsius, Fahrenheit, and Kelvin. Formula to convert from Fahrenheit F to Celsius C is C = (F - 32) * 5 / 9.Formula to convert from Kelvin K to Celsius C is C = K - 273.Here "C", "F", "K" represent that the temperature scale is in Celsius, Fahrenheit and Kelvin scales respectively. The input contains the temperature (a number) and the unit of the temperature scale (C,F, K) without any space. The output contains temperature in Celsius, Fahrenheit and Kelvin scales in each line in the format similar to input and the value of the temperature is rounded to 2 decimal places.
Finding Difference
Write a program to print the absolute difference between the two given numbers. (Absolute difference is the difference without the negative sign)Input
The first line of the input will be an integer N1.
The second line of the input will be an integer N2.Output
Print the absolute difference of the given two numbers.Explanation
For example, if the given N1 is 200 and N2 is 500
The difference in number is 200 - 500 = -300
The absolute difference is 300.
Letter, Digit or Special Character
You are given a character as input. Check if the given input is a Lowercase Letter or Uppercase Letter or Digit or a Special Character.
Input
The first line of input is a single character N.
Explanation
In the given example character is
9. So, the output should be Digit.
Sample Input 1
9
Sample Output 1
Digit
Sample Input 2
A
Sample Output 2
Uppercase Letter
what is the program output/errors
#include<iostream>
using namespace std;
int fun (int x, int y)
{
return x + y;
}
double fun (int x, int y)
{
return x * y;
}
int main()
{
cout<<fun(5, 10);
return 0;
}
1) Design and implement a Java program to make a chat platform using synchronization between 3 threads.
2) Design a flowchart of your design
3) Implement your your design
4) Put your code and screenshot output in your pdf file.
Develop a java application using Inheritance as per the following. Create a class
Worker and derive two classes DailyWorker and SalariedWorker from it. Every
worker has name, salary rate. Provide a method ComPay(int hours) to compute the
week pay of every worker. A DailyWorker is paid on the basis of number of days
he/she works. The SalariedWorker gets paid the wage for 40 hours a week no
matter what actual hours is. Implement this scenario to calculate the pay of workers.
You are expected to use the concept of Inheritance with proper run time
polymorphism
Develop a java application using Inheritance as per the following. Create a super class called
CashTree which demonstrate any ATM Machine. Have attributes like name, codeno, location,
etc. Add functionalities like ViewBalance, WithDraw and Deposit in super class. Derive two
sub classes SBI_Bank, and HDFC_Bank with additional properties such as customer_name,
balance and redefine those super class functionalities according to the nature of specified
bank (differenciate via service_charges, interest rate, and maximum withdraw limit etc).
Complete the above scenario using Inheritance, Run Time Polymorphism with Menu driven
options.