1. A company is offering a job with a salary of Rs. 50,000.00 for the first year and a 4% raise each year after that. If that 4% raise continues every year,
Find the total amount of money an employee would earn in a 10-years career.(Using the geometric Progression).
Pyramids Frequency
These are N pyramids in a line.You are given their heights as space-separated integers.Write a program to print the heights of the pyramids in increasing order along with their frequency.
Input
The first line of input contains space-separated integers.
Output
Each line of output should contain the height of the pyramid and its frequency in the ascending order of the pyramid's height.
Explanation
In the example, The given pyramid heights are 1,5,1,2,5,6.
The frequency of each unique pyramid height is
1 2
2 1
5 2
6 1
Sample Input1
1 5 1 2 5 6
Sample Output1
1 2
2 1
5 2
6 1
Stale Ingredients
Yasoda went to a store to buy Ingredients to make a boul of soup.While billing the order,salesperson found that some ingredients are stale.So, he wants to separate the stale ingredients from the rest.You are given the prices of the ingredients,where a negative price value indicates a stale ingredient.Write a program to help the sales person to move the prices of all the stale ingredients to left without changing the relative order of the ingredients.
Input
The first line of input contains space-separated integers.
Explanation
In the example, there are 6 ingredients with prices 11,-12,13,-14,15,16 respectively.
The prices of the stale ingredients in the given list are -12 and -14 in the order of occurence.
So, the output is -12 -14 11 13 15 16.
Sample Input1
11 -12 13 -14 15 16
Sample Output1
-12 -14 11 13 15 16
Sample Input2
21 11 -3 -2 9
Sample Output2
-3 -2 21 11 9
Write a python program to design a class representing complex numbers and having the functionality of performing addition & multiplication of two complex numbers using operator overloading
Highest Sum of Scores
The students in the class were divided into groups of three.Each student was given a T-shirt for a game.Later they were asked to calculate the score of their group by adding the jersey numbers on the T-shirt of every member.Find the group with the highest scores and print the jersey numbers on the T-shirts of every group member.
Input
The first line of the input contains an integer N that denotes the number of groups.
The next N lines of input contains the scores of students in the group separated by comma.
Output
The output contains the scores of the students of the group with maximum sum separated by space.
Explanation
Given the input lists are [[0,1,2],[3,1,0]].
The sum of the scores is highest in the group[3,1,0] i.e., 4.So the output should be 3 1 0.
Sample Input1
2
0,1,2
3,1,0
Sample Output1
3 1 0
Write a C program to print weight and height of a person using typedef.
Runtime Input :
Weight: 50.5
Height: 7.2
A college has to generate the roll number of the students for the internal examination. The college admin authority has to generate the roll numbers from the registration number of the students. Every student has a registration number. The registration number is a numeric number. The authority has devised a method for generating the roll numbers from the registration number. To generate the roll number, the pairs of adjacent digits are formed from the start of the roll number. From each pair the lexicographically smallest digit will be removed. If a digit will be left unpaired then that digit will be taken as it is in the roll number.
Write an algorithm for implementing
the devised method for the college
system to find the roll number from
the registration number,
Difficult Addition
Arjun is trying to add two numbers. Since he has learned addition recently, an addition which requires a carry is difficult for him. Your task is to print Easy if the addition does not involve a carry, Otherwise print Hard.
Input
The first line of input contains two space separated integers A and B.
Output
If the addition does not involve a carry,print Easy, otherwise print Hard.
Explanation
When calculating 229 + 390, we have a carry from the tens digit to the hundreds digit, so the answer is Hard.
Sample Input1
229 390
Sample Output1
Hard
Sample Input2
123456789 9876543218
Sample Output2
Easy
You are given space separated integers as input.
Write the program to print the maximum number among the given numbers
Algorithm,flow chart and pseudocode for sequence of comma separated numbers