Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-27-2008, 05:46 AM
Witnesses Witnesses is offline
Newbie
 
Join Date: Jan 2008
Posts: 4
Rep Power: 0
Witnesses is on a distinguished road
Default New to c programming...don't know where to start

...

Last edited by Witnesses; 02-12-2008 at 06:12 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 01-27-2008, 06:47 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 696
Last Blog:
Programs Under the Hoo...
Rep Power: 12
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

First off, start by creating your main function, and declaring your variables, such as double radius, double height, etc. Then use scanf to input the values, and printf to print them out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-27-2008, 11:11 PM
Witnesses Witnesses is offline
Newbie
 
Join Date: Jan 2008
Posts: 4
Rep Power: 0
Witnesses is on a distinguished road
Default

...

Last edited by Witnesses; 02-12-2008 at 06:12 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-28-2008, 12:08 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,255
Last Blog:
wxWidgets is NOT code ...
Rep Power: 36
WingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to allWingedPanther is a name known to all
Default

It looks like you're going in the right direction. Now, have you run it with test data to make sure you get the correct results? Compare the program's output to what you get by hand for the same data.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-29-2008, 08:43 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 696
Last Blog:
Programs Under the Hoo...
Rep Power: 12
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

Your surface area formula is only right if the cylinder has an open top. The second part should be 2*PI*rad*rad. Otherwise, it looks like your code is correct. You might want to check the input for negative values just for more error-catching. Otherwise, it's pretty good. Nice clean code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows XP Tricks & Tips!!!!..new ones. pranky Tutorials 9 08-23-2008 04:22 PM
C++: How should you start learning it? WingedPanther C Tutorials 8 03-25-2008 01:24 PM
Beginning Programming frank_l C and C++ 11 10-11-2007 03:23 AM
New to programming... Python a good start? TwoToedTurkey Python 3 08-01-2007 12:55 PM
How did you start programming? TcM General Programming 22 01-19-2007 08:49 AM


All times are GMT -5. The time now is 07:22 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads