0% found this document useful (0 votes)
2 views16 pages

C Programming Patterns and Algorithms

The document outlines various programming tasks including generating Roman numerals, square patterns, perfect numbers, and prime numbers within a range. It also covers calculations for odd and even sums, harmonic series, and patterns involving numbers. Additionally, it includes instructions for manipulating digits of numbers and handling input validation for multiplication of specific digit ranges.

Uploaded by

riyass.ug.24.cb
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views16 pages

C Programming Patterns and Algorithms

The document outlines various programming tasks including generating Roman numerals, square patterns, perfect numbers, and prime numbers within a range. It also covers calculations for odd and even sums, harmonic series, and patterns involving numbers. Additionally, it includes instructions for manipulating digits of numbers and handling input validation for multiplication of specific digit ranges.

Uploaded by

riyass.ug.24.cb
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Roman Numeral
2. Square Pattern
[Link] number (if perfect it will print the largest divisor else it will print the given number )
[Link] number between range (all test case passes)
[Link] series

6.
[Link] theorem
7.

Input:9
Output:1 3 5 7 9
[Link] and even number sum
Input:8
Output:
Even numbers less than 8: 2 4 6
Even Sum = 12
Odd numbers less than 8: 1 3 5 7
Odd Sum = 16
9. odd and even squares
[Link] squarre
[Link] pattern
[Link] NO OR NOT

1
[Link] pattern
14. "Write a program to generate a pattern of numbers starting from 9 and decreasing by 1 each time
per row. Each row should start from 9 and contain one more digit than the previous row. After
printing all the rows, print the sum of all the numbers formed in each row."

15. Write a C program to remove the first and last digit of a number and print the result. If the
number becomes 0 or invalid after removal, print 0.

Input:0073627Output:362
16.  Take N numbers as input.
 If N <= 0 → print "Invalid input".
 Only 1-digit or 2-digit numbers (i.e., 0 to 99 and -99 to -1) should be included in the
multiplication.
 Ignore numbers with 3 or more digits (positive or negative).
 Negative numbers (of 1 or 2 digits) should still be included in the multiplication

You might also like