need help in turbo c ++

I need help on how to create a figure of he spherical segments of two

Page 1 of 1

1 Replies - 1841 Views - Last Post: 14 January 2009 - 06:14 AM Rate Topic: -----

#1 ading  Icon User is offline

  • New D.I.C Head

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

need help in turbo c ++

Post icon  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);

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

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  Icon User is offline

  • I must break you
  • member icon

Reputation: 90
  • View blog
  • Posts: 3,060
  • Joined: 04-January 08

Re: need help in turbo c ++

Posted 14 January 2009 - 06:14 AM

:code:

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.


PLease DO NOT double post your questions.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1