Skip to content

ZakiAlSaad/CSE1231-ASSIGNMENT01-VU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Programming Practice: Loops, Series & Number Manipulation

This repository contains a collection of fundamental C programming exercises focused on loops, mathematical series, and number manipulation. These problems are excellent for practicing logic, problem-solving, and algorithmic thinking in C.

🛠️ Recommended Environment

  • Compiler: GCC (GNU Compiler Collection)
  • Code Editor: Visual Studio Code (VS Code) with the C/C++ extension is highly recommended for writing and debugging these programs.

📋 List of Problems

Basic Loop Iterations

  1. Take a number n from the keyboard. Print the numbers from 0 to n.
  2. Take a number n from the keyboard. Print the even numbers from 2 to n.
  3. Take a number n from the keyboard. Print the odd numbers from 1 to n.
  4. Take a number n from the keyboard. Print the numbers from 0 to n which are a multiple of another number, x. (For example, if n=10 and x=2, then the output numbers are 0, 2, 4, 6, 8, and 10).
  5. Take an integer number from the keyboard. Print its multiplication table.

Mathematical Series (Step-by-Step, without direct formulas)

  1. Input the value of n. Then solve the following series: 1 + 3 + 5 + …… + (2n-1)
  2. Input the value of n. Then solve the following series: 2 + 4 + 6 + …… + 2n
  3. Input the value of n. Then solve the following series: 12 + 32 + 52 + …… + (2n-1)2
  4. Input the value of n. Then solve the following series: 22 + 42 + 62 + …… + (2n)2
  5. Input the value of n. Then solve the following series: 1 + 1/2 + 1/3 + …… + 1/n
  6. Input the value of n. Then solve the following series: 1 + 1/22 + 1/32 + …… + 1/n2
  7. Input the value of n. Then solve the following series: 1 + 1/3 + 1/5 + …… + 1/(2n-1)
  8. Input the value of n. Then solve the following series: 1/22 + 1/42 + 1/62 + …… + 1/(2n)2

Number & Digit Manipulation

  1. Find the factorial of a given number, n.
  2. Find the sum of all constituent digit(s) of a taken integer number from the keyboard.
  3. The numbers in the sequence 1, 1, 2, 3, 5, 8, 13, 21…… are called Fibonacci numbers. Use a loop structure to calculate and print the first m Fibonacci numbers.
  4. Write a C program to count the number of digits in a number.
  5. Write a C program to find the first and last digit of a number.
  6. Write a C program to find the sum of the first and last digit of a number.
  7. Write a C program to calculate the sum of digits of a number.
  8. Write a C program to calculate the product of digits of a number.
  9. Write a C program to enter a number and print its reverse.
  10. Write a C program to check whether a number is a palindrome or not.
  11. Write a C program to find the power of a number using a loop.
  12. Write a C program to check whether a number is a Prime number or not.
  13. Write a C program to check whether a number is an Armstrong number or not.

Happy Coding!

About

This repository contains a curated set of C programming practice problems. It covers fundamental concepts like loop iterations, step-by-step mathematical series calculation, and digit manipulation. It is designed to help beginners strengthen their algorithmic thinking and problem-solving skills in C

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages