Accept n Country (ccode, cname, population) information and perform the following
a. Display all country details
b. Search country by cname
c. Search country by ccode
d. Display all countries having population greater than 2500000
e. Display country details having maximum population
The placement session has begun in a college. There is N number of students standing outside an interview room in a line. It is given that the person who goes first has higher chances of selection.
Each student has a number associated with them representing their problem-solving capability. The higher the capability the higher the chances of selection. Now every student wants to know the number of students ahead of him with higher problem-solving capability.
As a safety precaution banks provide a feature that during any ATM transaction if someone comes and attacks, then the customer can enter the ATM pin in reverse order. This sends a message to the nearest police station. However if the reversed pin is the same as he original pin then no alarm is created. The bank needs a software application that checks that a user chooses an ATM pin whose reverse is not the same number. A software need to be developed with following requirements using while loop.
a. Read the pin number
b. Calculate the reverse the pin number
c. if the reversed pin is same as original pin then inform the user that this is an invalid pin number
Mr Raman likes to spend the quarantine time with some useful work. he plans to stitch the Mass. he purchases cloth of colour white x cm, cloth of colour black y cm. The white mask takes 12 cm for each mask and the black mask take 10 cm for each mask. How many masks did Mr. Raman stitched. Requirements 1. Capture the size of black cloth y and White cloth x cm. 2. Calculate the number of black mask that can be stitched of size 10 cm. 3. Calculate the number of white Marsh that can be stitched of size 12 CM. 4. Calculate the total masks stitched. 5. Display the total masks.
Vishal is having a bunch of coins ranging from rupees 1 to 10. Help him to write program to find the sum and average of the coins that he is having using while loop.
Given the function signatures
Multiplication- int multiplication(int a,int b)
Area of the circle- float circle_area(int radius)
Check if the number is even or odd- void iseven(int number)
Find factorial- int fact(int n)
Smallest of 3 number- int smallest(int a,int b, int c)
Write a single C program to perform the following operations. Read the choice where , if choice is 1 Multiplication should be performed, if choice is 2 Area of Circle should be executed, if choice is 3 them it has to execute the function of checking number is even or odd, if the choice is 4 then it has to find the factorial of a number and if the choice is 5 then execute the function smallest of 3 numbers
Wedding Game
In a wedding that you are attending, there are some chairs that have digits inscribed at their
backs. The chairs are lined in a row such that they form a string of the digits. Find the
minimum number of sets M that can be formed from these digits such that:
1. The number of digits in each set is one or more than one.
2. Each set is formed using consecutive digits and no digit can be used more than once.
3. In each set, the number formed using the digits is less than or equal to Y.
Input Specification:
input1: S, string of digits
input2: Y, No number should be greater than Y
input3: Size of the String S
Output Specification:
Your function should return M, the minimum number of sets
Example 1:
input1: "1234"
An E-Commerce commerce company plans to give their customers a discount for the New Years holiday. The discount will be calculated based on the bill amount of the order placed. The discount amount is the product of the sum of all odd digits and the sum of even digits of the customer’s total bill amount. If no odd digit is present in the bill amount, then 0 will be consider for its corresponding sum.
Write an algorithm to find the discount amount for the given total bill amount.
For the given data construct Binary Search tree and obtain pre-order , post order and In-
order transversal ( Data set: -90,0,78,20,34,678,32,56,56).
Design and implement ordinary queue program using fixed size array to hold student data
with two fields – ID and Name ( ID- int and Name- char)