You are on page 1of 2

ISLAMIC UNIVERSITY OF TECHNOLOGY(IUT)

ORGANISATION OF ISLAMIC COOPERATION (OIC)


Department of Computer Science and Engineering (CSE)
CSE 4272: Computer Programming
Lab 4

Objectives:
● Usage of iterative statements
Task:
1. Write a program in C to display the sum of the series [ 9 + 99 + 999 + 9999 ...].
Sample Output:

2. Write a C program to check whether a given number is an Armstrong number or not.


When the sum of the cube of the individual digits of a number is equal to that number, the number
is called Armstrong number. For Example 153 is an Armstrong number because 153 = 13+53+33.

3. Write a program in C to find the LCM (Least Common Multiple) of any two numbers. For
example, the LCM of 4 and 5 is 20:
4. Write a C program to convert a binary number into a decimal number without using array or math
library. (You can store the binary numbers as int variable for this task)

Sample Output:

You might also like