Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   General Computer Support (http://www.velocityreviews.com/forums/f44-general-computer-support.html)
-   -   New to C++ (http://www.velocityreviews.com/forums/t725531-new-to-c.html)

nabilbhatiya 06-14-2010 01:36 PM

New to C++
 
Hello, I've just started learning C++

I downloaded Turbo C++ and installed in on my PC.

There's a book that I'm referring to and there's this program for the beginners that's not working.

/* Calculation of simple interest */
/* Author gekay Date: 25/05/2004 */
main( )
{
int p, n ;
float r, si ;
p = 1000 ;
n = 3 ;
r = 8.5 ;
/* formula for simple interest */
si = p * n * r / 100 ;
printf ( "%f" , si ) ;
}

it says ERROR NONAME00.cpp 12 : Function 'printf' should have a prototype
WARNING NONAME00.cpp 13: Function should have a value.

What is this? How can this be solved?

I've done wonders in Visual Basic but I'm a novice in C++

I need a helping hand!


All times are GMT. The time now is 10:53 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.