Some pliz write me a simple program to find the Area and circumference of a circle given that radius is 4 and Pi is 22.7 | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
- 1

# Some pliz write me a simple program to find the Area and circumference of a circle given that radius is 4 and Pi is 22.7

17th Oct 2022, 11:09 PM
Cyber Ninja
22 Antworten
+ 2
SoloLearn is not a code writing service. If you want to write the code, we can help you.
18th Oct 2022, 2:19 AM
+ 2
18th Oct 2022, 5:38 AM
Brian
+ 2
The operator, ^, is a Bitwise Exclusive Or. There is no operator for exponent in C. The simplest way to square a number in C is to multiply it. float area = PI*radius*radius;
20th Oct 2022, 12:13 AM
Brian
+ 1
pi is 22.7 ??? the formula to get an area of a circle is pi * radius ^ 2 the circumference is 2 * pi * radius pi is supposed to be 3.14159. it cannot be changed.
18th Oct 2022, 4:39 AM
Apollo-Roboto
+ 1
alright, when asking a question on any online forum, you have to do some work yourself and never expect others to write code for you. I asked "what have you tried" and you are not giving any code! put in as much information as you can in your question so we can know where the problem is... writing a formula for an area and circumference is very basic. We want to know if you are having trouble getting user input, or if there are compilation errors. Maybe you do have some code but it does not give the right answer. give us something so we can help you.
19th Oct 2022, 1:08 PM
Apollo-Roboto
+ 1
#include<stdio.h> int main () { // data type identifier; int radi ; int PI ; // calculate area of a circle ; radi= 40 ; PI= 3.1428 ; int area= PI * radi ^2 / 2; printf ("area:%d \n" , area) ; return 0;
19th Oct 2022, 6:18 PM
Cyber Ninja
+ 1
19th Oct 2022, 7:41 PM
Apollo-Roboto
+ 1
Blaq Mosh For a new question, open a new post
20th Oct 2022, 2:29 AM
0
what have you tried? what language do you need help with?
18th Oct 2022, 4:54 PM
Apollo-Roboto
0
C
18th Oct 2022, 8:38 PM
Cyber Ninja
0
Thanks let me try
19th Oct 2022, 7:47 PM
Cyber Ninja
0
Once I put the float ...and run the program, it shows an error on the word float and says it turns to binary
19th Oct 2022, 10:07 PM
Cyber Ninja
0
Did it as well still errors
20th Oct 2022, 12:14 AM
Cyber Ninja
0
Blaq Mosh if you changed the variable type for area from int to float, then the print format specifier also must match. Change %d to %f. print("area: %f\n", area); Keep at it. Teach the computer who is the boss!
20th Oct 2022, 12:28 AM
Brian
0
🤣🤣🤣 let me see
20th Oct 2022, 12:30 AM
Cyber Ninja
0
Brian ur right man 🥰 drop ur number we connect not only here bt on whatsapp too...please
20th Oct 2022, 12:42 AM
Cyber Ninja
0
It worked??
20th Oct 2022, 12:42 AM
Cyber Ninja
0
Blaq Mosh, Sololearn is the only social media where I can be found. There is a great community of patient experts and helpers here. Feel free to post more questions, and remember first to show what you tried - even if it doesn't work.
20th Oct 2022, 1:02 AM
Brian
0
How can we write program to calculate percentages of 5 subjects
20th Oct 2022, 1:03 AM
Cyber Ninja
0
Thank u sir
20th Oct 2022, 6:52 AM
Cyber Ninja