0% found this document useful (0 votes)
4 views2 pages

Questions To Intro To Comp Programming

The document outlines a series of programming exercises in C, categorized into sections such as Basic I/O & Statements, Conditions & Loops, Functions, Arrays, and Math. Each section contains specific tasks, including calculating sums, finding prime numbers, and manipulating arrays. The exercises aim to enhance programming skills by covering fundamental concepts and operations.

Uploaded by

clemoskiiadrian
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)
4 views2 pages

Questions To Intro To Comp Programming

The document outlines a series of programming exercises in C, categorized into sections such as Basic I/O & Statements, Conditions & Loops, Functions, Arrays, and Math. Each section contains specific tasks, including calculating sums, finding prime numbers, and manipulating arrays. The exercises aim to enhance programming skills by covering fundamental concepts and operations.

Uploaded by

clemoskiiadrian
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
You are on page 1/ 2

🔹 Basic I/O & Statements

1.​ Write a C program to input two integers and print their sum, difference, and product.​

2.​ Write a program that takes the radius of a circle from the user and calculates the area
and circumference.​

🔹 Conditions & Loops


3.​ Write a program to find the largest of three numbers.​

4.​ Write a program to print the multiplication table of any number up to 10.​

5.​ Write a program to check whether a number is even or odd.​

6.​ Write a program to print all prime numbers between 1 and 100.​

7.​ Write a program to calculate the factorial of a number using a loop.​

8.​ Write a program to check whether a number is a palindrome.​

🔹 Functions
9.​ Write a function to find the square of a number.​

10.​Write a function to check if a number is prime.​

11.​Write a program with a function to calculate and return the cube of a number.​

12.​Write a function that takes a mark (0-100) and returns a grade (A, B, C, D, F) based on
the score.​
🔹 Arrays
13.​Write a program to input 5 integers into an array and display the average.​

14.​Write a program to find the maximum and minimum element in an array.​

15.​Write a program to sort an array in ascending order.​

16.​Write a program to reverse the elements of an array.​

🔹 Math (Squares, Roots, etc.)


17.​Write a program to find the square root of a number using sqrt() from <math.h>.​

18.​Write a program to generate squares of numbers from 1 to 10.​

19.​Write a program to take 3 numbers and compute the roots of a quadratic equation.​

20.​Write a program to find the power of a number using pow(base, exponent).​

You might also like