Turn on thread page Beta

programming in C watch

Announcements

    can anyone see what is wrong with this prgram to find the Area and circumference of a circle? thanks!


    #include <stdlib.h>
    #include <stdio.h>

    int main()

    {

    float r,A,C;

    printf("input radius: ");
    scanf("%f", &r);

    A=3.14*r*r;

    C=2*3.14*r;

    printf("The Area = %d\n",A);

    printf("The Circumference = %d\n, C);

    exit(0);

    }
    Offline

    1
    ReputationRep:
    You lack a close quote on your printf, for a start.
 
 
 
Poll
Is the Big Bang theory correct?
Useful resources

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.