Wednesday 7 October 2020

C programs that can be solved without using loops and if else

Q) A computer programming contest requires teams of 5 members each. Write a program that asks for the number of players and then give the number of teams and number of players leftover?

Q) write a c program to read a 4 digit number and calculate sum of first 2 digits and last 2 digits.

Example: 

four digit number: 4536

first two digits: 45

last two digits: 36

sum = 45+36 = 81

Q) write a c program to read a 4 digit number and calculate sum of first 2 digits and last 2 digits and 

do the square of sum obtained

Example: 

four digit number: 4536

first two digits: 45

last two digits: 36

sum = 45+36 = 81

squareOfsum=81*81 = 6561

Q) In a town, the percentage of men is 52. The percentage of total literacy is 48. If total percentage of literate men is 35 of the total population, write an algorithm to find the total number of illiterate men and women if the population of the town is 80,000.

Q) https://www.hackerrank.com/challenges/p1-paper-cutting/problem

Q) https://www.hackerrank.com/challenges/maximum-draws/problem

Q) https://www.hackerrank.com/challenges/handshake/problem

Q) https://www.hackerrank.com/challenges/lowest-triangle/problem

Q) https://www.hackerrank.com/challenges/30-operators/problem

Q) https://www.hackerrank.com/challenges/summing-the-n-series/problem

Q) https://www.hackerrank.com/challenges/halloween-party/problem

Q) Write a C program to calculate simple interest

Q) Write a C program to convert the given temperature in Celsius to Fahrenheit 

No comments:

Post a Comment