# C Programs

## C Program to Print String

This C program is used to print a string on the screen input by the user. scanf function is used to obtain input and printf function is used to print the string on the screen

## C Program to Add n Number of Times

This C program adds n number of times which will be entered by the user.

## C Program to Generate Random Numbers

This C program generates numbers randomly using random function.

## C Program to Check whether the Given Number is a Palindromic

If a number, which when read in both forward and backward way is same, then such a number is called a palindrome number.

## C Program to Check whether the Given Number is a Prime

A prime number is a natural number that has only one and itself as factors.

## C Program to Find the Greatest Among Ten Numbers

This C Program is used to find the greatest among ten numbers. Program: #include <stdio.h> int main() { int a; int i; int greatest; printf("Enter ten values:"); //Store 10 numbers in an array for (i = 0; i < 10; […]

## C Program to Find the Greatest Number of Three Numbers

This C Program is used to find the greatest number of three numbers. Program: #include <stdio.h> int main(){ int a, b, c; printf("Enter a,b,c: "); scanf("%d %d %d", &a, &b, &c); if (a > b && a > c) { […]

## C Program to Asks the User For a Number Between 1 to 9

C program which asks the user for a number between 1 to 9 and shows the number. If the user inputs a number out of the specified range, the program should show an error and prompt the user for a valid input.

## C Program to Check Whether the Given Number is Even or Odd

even numbers are perfectly divisible by 2. In this example, if else statement is used to check whether a number entered by the user is even or odd.

## C Program to Swapping Two Numbers Using Bitwise Operators

This C program is used to swapping two numbers, using bitwise operators.

## C Program to Display The Multiplication Table of a Given Number

This C program is used to display the multiplication table of a given number. Program: #include <stdio.h> int main() { int num, i = 1; printf(" Enter any Number:"); scanf("%d", &num); printf("Multiplication table of %d: ", num); while (i <= […]

## C Program to Calculate Simple Interest by Given Principle, Rate of Interest and Time

Simple interest is calculated by, sinterest=principletimerate/100 formula.

## C Program to Find Factorial

This C program calculates the factorial value using recursion.

## C Leap Year Program

C program code for Leap Year, this C program is used to check whether the given year of input is a leap year or not.

## C Program to Generate the Fibonacci Series

In the Fibonacci series, a number of the series is obtained by adding the last two numbers of the series.

## C Program to Print Without Semicolon

This C program is used to print on the screen without using a semicolon. Semicolon must be used after printf function, but we can avoid this, by using printf function with if, while or switch statements.

## C Program to Convert Number into Word

This program is used to convert a given number into its / their equivalent words. Program: #include<stdio.h> void main() { int num, i=0, x, d; char word_no ; printf ("Enter an integer value: \n"); scanf ("%d", &num); while (num) […] 