UPDATED:

How To Make A Simple Calculator By C Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... Happy Coding.......... This blog is under construction!!!!
Namecheap.com

Thursday, June 2, 2016

How to find circle area using πr ² formula in C

πr² is a common formula to us.But can you find a circle area value by C?
if not,try this.It's help you to know how to find/print the value of a circle 
area in C programming language.


Code to print the value:


#include<stdio.h>

#define PI 3.1416

int main()
{
    float circle_area, r;

    printf("Enter the value of radius: \n");
    scanf("%f", &r);

    circle_area = PI *r * r;

    printf("The circle area is: %.2f\n", circle_area);


return 0;

}


OR,


#include<stdio.h>



int main()

{
    float circle_area, r, PI=3.1416;

    printf("Enter the value of radius: \n");

    scanf("%f", &r);

    circle_area = PI * r * r;


    printf("The circle area is: %.2f\n", circle_area);



return 0;


}


The Output is:




Face problems?No problem.You can share your problems by commenting below.or you can leave a massage us.Thank you.

make a currency converter By C programming language

We can make a simple currency converter by C programming language.

Lets see the code:

#include <stdio.h>
double convert(void);
int main(void){

    double taka;

    taka=convert();
    printf("In taka= %0.2lf\n",taka);

    return 0;
}

double convert(void)
{
    double dollars,multi_value;
    multi_value=80.0;

    printf("enter dollar amount: \n");
    scanf("%lf", &dollars);

    return dollars*multi_value;

}

Output:

It is really great.But if you face any problem or have any question,please comment below.
Namecheap.com

Popular Posts