Assignment On C Programming
Assignment On C Programming
Batch: ME-A1
Class Problems:
Problem 1: Write a C Program to input two digits number from user and display with reverse
number on screen (Hint: I/P : 32 O /P : 23)
Problem2: Write a C Program to display greater number from two numbers.
Problem 4: Write a C Program to display a number is positive or negative.
Problem 3: Write a C Program to input two numbers from keyboard and check whether the first
number is divisible by second number.
Home assignment:
Problem 1: Write a C Program to find area of a triangle (Hint : A = *h*b). The height and base
will be given as input.
Problem 2: Write a program which will take 2 numbers as input and will print their addition,
subtraction, multiplication and division as output.
Problem 3: Write a program to interchange the contents of two variables.
Problem 4: Write a program to output the following triangles of stars:
*
*****
***
*****
*******
*****
Problem 5: If a 5 digit number is input through the keyboard, write a program to calculate and
print the sum of its digits.
[Hint: Use the modulus operator %]
Problem 6: If a 4 digit number is input through the keyboard, write a program to obtain the sum
of the first and last digit of this number.
Problem 7: Rahims basic salary is input through the keyboard. His House rent allowance is 30%
of basic salary and medical allowance is 5% of basic salary. He gets extra 1000 tk as technical
allowance. Write a program to calculate his gross salary and print the result.
Problem 8: Any integer is input through keyboard. Write a program to find out whether it is an
odd number or even number.