Results 1 to 2 of 2

Thread: C code Area of circle:

  1. #1
    GonzalezBrown is offline Senior Member
    Join Date
    Dec 2009
    Posts
    260
    Rep Power
    4

    Default C code Area of circle:

    Code:
    #include <stdio.h> 
    #define PI 3.14159
    
    int main()
    {
    float area , radius ;
    printf("Enter the radius of the circle.\n");
    scanf("%f",&radius);
    area = PI * radius * radius;
    printf("The area of a circle is %f.\n",area);
    return 0;
    }

  2. #2
    LewisClark is offline Senior Member
    Join Date
    Dec 2009
    Posts
    260
    Rep Power
    4

    Default

    Code:
    #include<stdio.h>
    #include<conio.h>
    main() 
    { 
    int r; 
    float a; 
    print f ("Enter r value n"); 
    scan f ("%d", &r); 
    a=3.14*r*r; 
    print f("area=%f",a); 
    }
    Last edited by nitesh14; 05-29-2010 at 02:13 PM.

Similar Threads

  1. C code for area of circle
    By WilsonMartin in forum Programming
    Replies: 2
    Last Post: 06-02-2010, 01:13 PM
  2. C code for area of triangle
    By CoxWatson in forum Programming
    Replies: 2
    Last Post: 05-17-2010, 02:24 PM
  3. Circle simple c24
    By Zanetta Xever in forum other peripherals
    Replies: 0
    Last Post: 11-17-2009, 08:32 AM
  4. Circle Bloom cabinet
    By Victoro Xalvador in forum CPU & Components
    Replies: 0
    Last Post: 11-17-2009, 08:28 AM
  5. Alienware Area-51 and Area-51 ALX Core i7 Gaming PCs
    By Macavi6987 in forum Homebuilt Systems
    Replies: 0
    Last Post: 09-25-2009, 11:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48