# need help in turbo c ++

Page 1 of 1

## 1 Replies - 2738 Views - Last Post: 14 January 2009 - 06:14 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'https://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=80820&amp;s=a4f7011083f0a60c5a232665d758f449&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

Reputation: 0
• Posts: 2
• Joined: 14-January 09

# need help in turbo c ++

Posted 14 January 2009 - 06:11 AM

I need help on how to create a figure of the spherical segments of two bases... i have codes on solving it but i don't know how to create a sphere in turbo c..
here's my code..
```#include<conio.h>
#include<stdio.h>
#include<math.h>

void main(){

float a, b, h;
float volume, area, r, pi=3.1416;
float temp;

printf("Enter a:"); scanf("%f",&a);
printf("Enter b:"); scanf("%f",&b);
printf("Enter h:"); scanf("%f",&h);

temp=( (3*(pow(a,2))) + (3*(pow(b,2))) + (pow(h,2)) )
volume=(((pi*h)/6)*temp)

printf("Volume:  %.2f", volume);

area=(2*pi*r*h);

printf("Area:  %.2f", area);

getche();
}

```

Is This A Good Question/Topic? 0

## Replies To: need help in turbo c ++

### #2 jjsaw5

• D.I.C Lover

Reputation: 92
• Posts: 3,063
• Joined: 04-January 08

## Re: need help in turbo c ++

Posted 14 January 2009 - 06:14 AM

You are going to need to provide us with more information. Just posting your code does nothing. We need to know what is going on what is not working.

Post your errors along with any error messages. Post information in the post itself, NOT in the title of the thread.