C program to check whether a given integer is odd or even.

Write a C program to check whether a given integer is odd or even.Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/



#include <stdio.h>
#include <conio.h>

void main()
{
int ival, remainder;

clrscr();

printf("Enter an integer :");
scanf ("%d", &ival);

remainder = ival % 2;

if (remainder == 0)
printf ("%d, is an even integern", ival);
else
printf ("%d, is an odd integern", ival);

}
Read more Similar C Programs
Searching in C

Number Theory 
C Strings
 

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C program to find the simple interest , given principle, rate of interest and time.

C program to find the simple interest , given principle, rate of interest and time. Simple Interest is the money paid by the borrower to the lender, based on the principle amount, Interest rate and the time period.
Simple interest is calculated by, SI=P*T*R/100 formula.
Where, P is the principle amount.
T is the time period.
R is the Interest Rate.
Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/



#include <stdio.h>
#include <conio.h>

void main()
{

float p, r, si;
int t;

clrscr();

printf("Enter the values of p,r and tn");
scanf ("%f %f %d", &p, &r, &t);

si = (p * r * t)/ 100.0;

printf ("Amount = Rs. %5.2fn", p);
printf ("Rate = Rs. %5.2f%n", r);
printf ("Time = %d yearsn", t);
printf ("Simple interest = %5.2fn", si);

}
Read more Similar C Programs
Searching in C

Number Theory 
C Strings
 

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C program to find the area of a circle, given the radius

C program to find the area of a circle, given the radius. This is the simple C program to find the area of the circle, Here we define the PI value as macros, because it is constant through out the program. Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/


#include <stdio.h>
#include <conio.h>
#include <math.h>
#define PI 3.142

void main()
{
float radius, area;
clrscr();

printf("Enter the radius of a circlen");
scanf ("%f", &radius);

area = PI * pow (radius,2);

printf ("Area of a circle = %5.2fn", area);
}
Read more Similar C Programs
Searching in C

Number Theory 
 
C Strings
 

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program To Swap Two Variables

C Program To Swap Two Variables without using the third variable. This type of C programs are asked in various Interviews.There are various methods to achieve this one. For example, a=a+b;
b=a-b;
a=a-b;
Here we use the XOR(^) operator to Swap Two Variables without using the third variable. Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/


#include<stdio.h>

int main()
{
int a=20;
int b=10;
printf("Values of a and b before swappingn");
printf("a=%dnb=%dn",a,b);
a=a^b;
b=b^a;
a=b^a;
printf("Values of a and b After swappingn");
printf("a=%dnb=%dn",a,b);
return 0;
}
Read more Similar C Programs
C Interview Questions

Number Theory 
C Strings
 

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program to find the number and sum of all integers from 100 to 200 which is divisible by 7

Example programs to solve the problems of Arrays in C.
C program to find the number and sum of all integers from 100to 200 which is divisible by 7. Read more about C Programming Language .

Read more Similar C Programs
Array In C

Simple C Programs

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program to read ten integers from the keyboards and print the sum of even and odd numbers.

Example programs to solve the problems of Arrays in C.
C Program to read ten integers from the keyboard and print the sum of even and odd numbers.Read more about C Programming Language .

Read more Similar C Programs
Array In C

Simple C Programs

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program to concatenate two strings

C Strings:
Write a function to concatenate two strings, write a program to read three Strings and use the function to concatenate them and print it.
String concatenation is the process of combining two or more strings to a single String. Here, we write the function for string concatenation, and passing the three strings to concatenate. Read more about C Programming Language .

Read more Similar C Programs
Searching in C

C Strings

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program to find the squares and cubes of a two digit odd number.

C Program to find the squares and cubes of a two digit odd number. In this Program, we check the number is odd and a two digit number, then calculates its square and cube. Read more about C Programming Language .

/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact [email protected]
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/
#include<stdio.h>
int main()
{
int num,num1;
int count=0;
printf("Enter a two digit odd number\n");
scanf("%d",&num);
num1=num;
while(num>0)
{
num=num/10;
count++;
}
if((num1%2) && (count==2))
{
printf("\nThe square of givenC Program to find the squares and cubes of a two digit odd number. number is: %d",num1*num1);
printf("\nThe cube of given number is: %d",num1*num1*num1);
}
else
{
printf("The number entered is not an two digit odd number\n");
}
return 0;
}
view raw squares.c hosted with ❤ by GitHub

Read more Similar C Programs
Searching in C

C Strings

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program to evaluate the following series. f(x)=x-x3/3! + x5/5!-x7/7!…..into given numbers of terms.

C program to evaluate the following series. f(x)=x-x3/3! + x5/5!-x7/7!………………….into given numbers of terms. Series is a ordered set of elements combined together by additional operator. Finite series contains number of defined elements, and infinite series contains infinite elements. Read more about C Programming Language .

Read more Similar C Programs
Searching in C

C Strings

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com

C Program To Find The Roots Of Quadratic Equation

C program to To Find The Roots Of Quadratic Equation using if else statement…
Quadratic equation is the second degree equation of only one variable, which is in the form of ax^2+bx+c, where a, b, c are the constants. Here in this program, we use the simple if-else statement to fin the roots of the quadratic equation. Read more about C Programming Language .

Read more Similar C Programs
Searching in C

C Strings

You can easily select the code by double clicking on the code area above.

To get regular updates on new C programs, you can Follow @c_program

You can discuss these programs on our Facebook Page. Start a discussion right now,

our page!

Share this program with your Facebook friends now! by liking it

(you can send this program to your friend using this button)

Like to get updates right inside your feed reader? Grab our feed!

(c) www.c-program-example.com