0% found this document useful (0 votes)
30 views

Assignment On C Programming

The document outlines C programming assignment problems for a class including problems on inputting and reversing two digit numbers, comparing numbers, checking if a number is positive or negative, and checking if one number is divisible by another. It also lists home assignment problems such as calculating the area of a triangle from user input height and base, performing arithmetic operations on two user input numbers, interchanging variable contents, outputting star triangle patterns, summing the digits of a 5 digit number, summing the first and last digits of a 4 digit number, calculating an employee's gross salary from basic salary and allowances, and determining if a number is odd or even.

Uploaded by

Galib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Assignment On C Programming

The document outlines C programming assignment problems for a class including problems on inputting and reversing two digit numbers, comparing numbers, checking if a number is positive or negative, and checking if one number is divisible by another. It also lists home assignment problems such as calculating the area of a triangle from user input height and base, performing arithmetic operations on two user input numbers, interchanging variable contents, outputting star triangle patterns, summing the digits of a 5 digit number, summing the first and last digits of a 4 digit number, calculating an employee's gross salary from basic salary and allowances, and determining if a number is odd or even.

Uploaded by

Galib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

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.

You might also like