Convert the Number
Given a number having ten digits, convert it to a string following the below-mentioned rules.
Rules for conversion:
1.separate the number into a set of four-three-three digits
2.Use the following prefixes for successive digits
a.Single numbers: just read them separately
b.Two consecutive numbers: double
c.Three consecutive numbers: triple
d.Four consecutive numbers: quadruple
Input
The first line of input is a string of ten digits.
Sample Input1
9887666668
Sample Output1
nine double eight seven triplesix double six eight
Sample Input2
9090407368
Sample Output2
nine zero nine zero four zero seven three six eight
Topic: Function
Write a function-‐oriented program to convert the input dollar(s) into its equivalent
peso. Assume that one dollar is equivalent to 53.80 pesos.
Note: you can choose any looping statement if needed.
Topic: Function
Write a function-‐oriented program that calculates the sum of the sequence number from 1 to n. Thus, if the input is 5, the output should be 15
because:
1 + 2 + 3 + 4 + 5 = 15
Note: you can choose any looping statement if needed.
Topic; Function Write a function-‐oriented program that calculates the power value of the input base number and exponent number. Then display the power value. Sample input/output dialogue:
Enter base number: 5 Input data
Enter exponent number: 3 Second input data
Power value: 125 Output
(The computation is 53 = 5 * 5 * 5 = 125)
Note: you can choose any looping statement if needed.
Topic: Function
Write a function-‐oriented program that generates the Fibonacci series numbers of n (as input) and display them. In Fibonacci, the current third number is the sum of two previous
numbers.
Note: you can choose any looping statement if need.
Find 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.
Population limit: 277500
Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.
Topic: Function
Write a function-‐oriented program to convert an input Celsius into Fahrenheit degree. Use the formula F= (9.0/5.0)*C+32. Display the Fahrenheit degree.
Note: you can choose any looping statement if needed.
Topic: Function
Write a function-‐oriented program that converts the input indeed into its equivalent centimeters. One inch is equal to 2.54 cms. Display the converted centimeters value.
note: you can choose any looping statement if needed.
Topic: Function
Write a function-‐oriented program to calculate the area of a circle. Use the
formula: A=πr2 where Pi(π) is equal to 3.1416 (approximately).
note: you can choose any looping statement.
Write a code to find the frequency of prime numbers from a user input queue