C program to calculate the area and perimeter of a circle,where radius is a input|E-studyblog|

 C program to calculate the area and perimeter of a circle,where radius is a input|E-studyblog|

Welcome to our Blog.Here, I have shared the source code of C program to calculate the Area and Perimeter of a Circle.Share this blog among your friends who all are interested to  learn programming languages.

C program to calculate the area and perimeter of a circle,where radius is a input|E-studyblog|
C program to calculate the area and perimeter of a circle,where radius is a input|E-studyblog|

C program to calculate the area and perimeter of a circle,where radius is a input|

// C program to calculate the area and perimeter of  a circle
#include<stdio.h>

int main(){
	
	int radius;
	float area,perimeter;
	printf("\nEnter the radius:");
	scanf("%d",&radius);
	
	area=3.14*radius*radius;
	printf("\nThe area of the circle is:%f",area);
	return 0;
}

Output:

C program to calculate the area and perimeter of a circle,where radius is a input|E-studyblog|

I hope you have read our Article "C  Program to calculate the area and perimeter of a circle"and  you have collected lots of information from there.If you like the post,then please comment and share among your friends and family. you can write your opinion about my post in the comment box. 


Thank you!

C Program to swap two numbers without using third variable|E-studyblog2021|

 C Program to swap two numbers without using third variable|E-studyblog2021|


In this C-Program,we swap two numbers without using the third variable.We have done this Program by using  (+) and  (-).

     

C Program to swap two numbers without using third variable|E-studyblog2021|
 C Program to swap two numbers without using third variable|E-studyblog2021|


C Program to swap two numbers without using third variable|

// C program to swap the two numbers without using third variable
#include <stdio.h>
int main(){
	int a,b;
	printf("\nEnter the value of x & y\n");
	scanf("%d %d",&a,&b);
	printf("Before Swapping numbers :%d %d\n",a,b);
	 
	 a=a+b;
	 b=a-b;
	 a=a-b;
	 
	 printf("\nAfter Swapping: %d %d\n",a,b);
	 return 0;
}

Output:
C Program to swap two numbers without using third variable|E-studyblog2021|

I hope you have read our Article "C  Program to Swap the two numbers without using third variable|E-studyblog"  and  you have collected lots of information from there.If you like the post,then please comment and share among your friends and family. you can write your opinion about my post in the comment box. 


Thank you!

C Program to Swap (interchange) the Two Numbers with using Third variable|E-studyblog

 C  Program to Swap (interchange) the Two Numbers with using Third variable|E-studyblog

C  Program to Swap (interchange) the Two Numbers with using Third variable

C  Program to Swap (interchange) the Two Numbers with using Third variable|


#include <stdio.h>
int main(){
	double a,b,temp;
	printf("\nEnter first number:");
	scanf("%lf",&a);
	printf("\nEnter the second number");
	scanf("%lf",&b);
	//value of first(a) is assigned to temp
	temp=a;
	//value of second (b)is assigned to first(a)
	a=b;
	//initial value of temp is assigned to second (b)
	b=temp;
	
	printf("\n Swapping of first numbers=%.2lf\n",a);
	printf("\n Swapping of second numbers=%.2lf\n",b);
	
	return 0;	
}



Output:

C  Program to Swap (interchange) the Two Numbers with using Third variable|

I hope you have read our Article "C  Program to Swap (interchange) the Two Numbers with using Third variable|E-studyblog"  and  you have collected lots of information from there.If you like the post,then please comment and share among your friends and family. you can write your opinion about my post in the comment box. 


Thank you!

C Program to find Factorial of the number using For -Loop|E-studyblog|

 C Program to find Factorial of the number using For -Loop|E-studyblog|


C Program to find Factorial of the number using For -Loop|E-studyblog|

                                            C Program to find Factorial of the number using For -Loop|E-studyblog|


Factorial number?

A Factorial is a function that multiplies a number by every number.

For Example:- 
0!=1
1!=1
2!=2*1=2
31=3*2*1=6
4!=4*3*2*1=24
5!=5*4*3*2*1=120

Formula :- n!=n*(n-1)* ....*1

Factorial of the number

#include <stdio.h>
int main()
{
	int n,i,f=1;
	printf("\nEnter the value of n:");
	
        scanf("%d",&n); 
	
	for(i=1;i<=n;i++)
	f=f*i;         
	printf("\nFactorial =%d",f);
}


Output:

C Program to find Factorial of the number using For -Loop|E-studyblog|


I hope you have read our Article  and  you have collected lots of information from there.If you like the post,then please comment and share among your friends and family. you can write your opinion about my post in the comment box. 


Thank you!

C Program to check whether a number is palindrome or not| E-studyblog|

C Program to check whether a number is palindrome or not| E-studyblog|


C Program to check whether a number is palindrome or not E-studyblog
C Program to check whether a number is palindrome or not| E-studyblog|



What is palindrome number ?

An Integer is said to be palindrome if the reverse number remains the  same of that given number.
Example: 1001 is a palindrome number
                1234 is not a palindrome number


C Program to check whether a number is palindrome or not:

#include<stdio.h>
int main(){
	int n,s=0;
	printf("\nEnter the Integers:");
	scanf("%d",&n);
	int k=n;
	while(n>0)
	{

		int d=n%10;
		s=(s*10)+d;
		n=n/10;
		
	}
       //if k and s are equal
	if(k==s)
	printf("\nThe number is palindrome number:");
	else
	printf("\nThe number is not palindrome number:");
	
	return 0;
	
}


OUTPUT:

C Program to check whether a number is palindrome or not E-studyblog

C Program to check whether a number is palindrome or not E-studyblog





I hope you have read our Article  and  you have collected lots of information from there.If you like the post,then please comment and share among your friends and family. you can write your opinion about my post in the comment box. Thank you!

C Program to Check whether the number is Even or Odd|how to find odd and even numbers in c programming|E-studyblog

I n this Article, you will learn how to   Check  whether the number is  Even or odd. We have shared the source code of odd and even number i...