Write a program to take a name as input then display the signature as the first letter of each word with dot.
Enter a String
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff Sr
H.B.W.S.
Temperature Conversion
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.
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.
Input
The first line of the input contain a temperature Value in one of Celsius, Fahrenheit, and Kelvin scales.
Output
first output should contain the Celsius value and the unit of the Celsius without any space.
second l output should contain the Fahrenheit value and the unit of the Fahrenheit without any space.
third output should contain the Kelvin value and the unit of the Kelvin without any space.
For example, if the given temperature Value is 25C then Celsius value is 25.0C, Fahrenheit value is 77.0F, and Kelvin value is 298.0K.
imp: here ouput gives 289.1k instead of 289.0k why ?
Create a class hierarchy that will represent trips, including member variables to store trip details. Create member functions that will:
Study the sample output carefully so you can correctly implement the trip hierarchy.
Input
5
1·Zamboanga·Cagayan·494·5
1·Tagbilaran·Panglao·20·10
2·Cebu·Tagbilaran·90·800
3·Manila·Davao·1500·4500
3·Clark·Iloilo·751·2300Output
Trip·Constructor
Bus·Constructor
Bus·Trip:·Zamboanga·to·Cagayan,·494·km,·P5·base·fare
Trip·Constructor
Bus·Constructor
Bus·Trip:·Tagbilaran·to·Panglao,·20·km,·P10·base·fare
Trip·Constructor
Boat·Constructor
Boat·Trip:·Cebu·to·Tagbilaran,·90·km,·P800·base·fare
Trip·Constructor
Plane·Constructor
Plane·Trip:·Manila·to·Davao,·1500·km,·P4500·base·fare
Trip·Constructor
Plane·Constructor
Plane·Trip:·Clark·to·Iloilo,·751·km,·P2300·base·fare
Total·Cost·of·trips:·10950Find latitude and longitude of utmost 20 countries, ordered by population, with a population greater or equal to the population limit given below and have atleast one currency exclusively for themselves. (countries like Madagascar, Sri Lanka but not India, USA). Use the country details from this dataset.
Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.
Assume radius of earth: 6371 km
Round length of each line and final result to 2 decimal points
If co-ordinates are missing for any country use 0.000 N 0.000 E
Population limit: 65110000
Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.
1000 : 8
500 : 1
100 : 0
50 : 1
20 : 2
5 : 0
1 : 3
how to remove spaces before and after :
denominatio problem
Write a function named SameNumberOfFactors that takes two positive integer arguments and returns 1 if they have the same number of factors and 0 if they have not the same number of factors.
Write a program in java.io package to take a name(String) and salary(double) of 15 persons then display the name and salary and also display the average salary employees are getting.
Create a C++ program that reads 5 items and their prices and quantities. The program's basic requirements are as follows.
1.Declare four arrays of five elements each: item, price, quantity, and amount.
2. Declare the functions computeAmount, computeTotalAmount, displayItems, and strNew.
3.The expected output is depicted in the figure below.
strNew code:
//function that will adjust the string into specified length by adding spaces
string strNew(string str, int n) {
int l;
l = n - str.length();
for (int i = 1; i <= l; i++) {
str = str + " ";
}
return str;
}//end of strNew functionOutput Example
Enter Item 1: Milk
Enter the price: 125.75
Enter the quantity: 3
Enter Item 2:
Enter Item 3:
Enter Item 4:
Enter Item 5:
Amount: 377.25
Total Amount: 377.25
=========================
Item Qty Price Amount
Milk 3 125.75 377.25
Cake 2 500 1000
Spaghetti 1 700 700
Fruits 10 50 500
Waffle 7 45 315
Write a program in java.io package to take a String as input then display first word all capital letters, second word all small letters, third word all capital letters and so on.
Example:
Enter a String
Asia is the largest continent
ASIA is THE largest CONTINENT
Input 10 numbers. Put it in a list. Turn every item of a list into its square. Print the result.
Expected output:
Enter Input 1
Enter Input 2
Enter Input 3
Enter Input 4
Enter Input 5
Enter Input 6
Enter Input 7
Enter Input 8
Enter Input 9
[1, 4, 9, 16, 25, 36, 49, 64, 81]
Note: the inputs are used for demonstration purposes only. Use yor own combination of inputs.