Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

closed arera of circle and circumferance

+9 votes
asked Dec 5, 2021 by Nani Vinay Mokka (220 points)
closed Dec 15, 2021 by Admin
closed with the note: answered

4 Answers

+2 votes
answered Dec 5, 2021 by Peter Minarik (86,580 points)

Area: r2 * Pi

Circumference: 2 * r * Pi

Now, that we've cleared the mathematics, give your best try to implement the code on whatever programming language you need to use.

Share your code if you'd like someone to review it.

Good luck!

0 votes
answered Dec 9, 2021 by Omprakash Kumar (250 points)
reshown Dec 10, 2021 by Admin

#include<iostream>

using namespace std;

int main(){

int r;

cin >>r;

cout<<"Enter value of r"<<endl;

cout<<"the area of circle is  "<<r2*3.14;

cout<<"the curcumference is "<<2*r*3.14;

return 0;

}

0 votes
answered Dec 10, 2021 by Areeb Sherjil (1,960 points)
Area = pi*r^2

where r is the radius

Circumference = pi*d

where d is the diameter

(Please don't ask questions that you can get the answer from google in 5 seconds.)
0 votes
answered Dec 10, 2021 by Meda Hemal (140 points)
//BY MEDA HEMAL
#include<stdio.h>
int main()
{
    int rad;
    float PI=3.14,area,ci;
    printf("Enter radius :");
    scanf("%d",&rad);
    area = PI * rad * rad;
    printf("Area:%f\n",area);
    ci=2 * PI * rad;
    printf("Circumference:%f\n",ci);
    printf("by MEDA HEMAL");
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...