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

C Lab Assignment 4

This document outlines 8 programming assignments for a C programming lab: 1. Write programs to print natural numbers up to a given number, print the ASCII character of a given number, and calculate and confirm the square of a user-input number. 2. Additional programs include evaluating mathematical series up to a given number and calculating factorials. 3. The remaining programs are to print properties of numbers like digit sums, reverse, adding odd numbers, and multiplication tables; and check numbers for palindromes and Armstrong properties.

Uploaded by

Deep Raj Jangid
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

C Lab Assignment 4

This document outlines 8 programming assignments for a C programming lab: 1. Write programs to print natural numbers up to a given number, print the ASCII character of a given number, and calculate and confirm the square of a user-input number. 2. Additional programs include evaluating mathematical series up to a given number and calculating factorials. 3. The remaining programs are to print properties of numbers like digit sums, reverse, adding odd numbers, and multiplication tables; and check numbers for palindromes and Armstrong properties.

Uploaded by

Deep Raj Jangid
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

C-PROGRAMING LAB ASSIGNMENTS

!"#$%& ()*+ ,-./ 0.1/


%+23425 #65*7)8 92.2:2128 ;<1+=>5
#<:.2*.?@@ABCC@D@E
AsslgnmenL 4


1. WrlLe a program Lo prlnL naLural numbers up Lo a glven number.
2. WrlLe a program Lo prlnL Lhe ASCll charL wlLhln a glven number.
3. WrlLe a program Lo ask Lhe user for a number. rlnL Lhe square of Lhe
number and ask a conflrmaLlon from Lhe user wheLher Lhe user wanL Lo
conLlnue or noL.
4. WrlLe a program Lo evaluaLe 1/3 + 2/3 + 3/7 .. + n/((n*2) + 1).
3. WrlLe a program Lo evaluaLe 1/1 lacLorlal + 2/2 lacLorlal + n/n
lacLorlal.
1. WrlLe a program Lo prlnL Lhe sum of dlglL of a glven number.
2. WrlLe a program Lo prlnL Lhe reverse of a glven number.
3. WrlLe a program Lo add Lhe odd numbers wlLhln a glven number.
4. WrlLe a program Lo prlnL Lhe mulLlpllcaLlon Lable of a glven number.
3. WrlLe a program Lo compuLe Lhe facLorlal of a glven number.
6. WrlLe program Lo prlnL Lhe flbonaccl serles up Lo a glven number.
7. WrlLe a program Lo check a glven number ls allndrome or noL. A number ls
sald Lo be allndrome lf Lhe reverse of Lhe number ls equal Lo Lhe number.
8. WrlLe a program Lo check a glven number ls ArmsLrong or noL. A number ls
sald Lo be ArmsLrong lf sum of Lhe cube of Lhe lndlvldual dlglL ls equal Lo Lhe
number.
Lxample: - 133 = (1)3 + (3)3 + (3)3.

You might also like