New to C++

Discussion in 'General Computer Support' started by nabilbhatiya, Jun 14, 2010.

  1. nabilbhatiya

    nabilbhatiya

    Joined:
    Jun 13, 2010
    Messages:
    1
    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!
    nabilbhatiya, Jun 14, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGFu?=

    New computer, New OS, New Wireless Problem :-\

    =?Utf-8?B?RGFu?=, Jul 28, 2005, in forum: Wireless Networking
    Replies:
    3
    Views:
    587
    Malke
    Jul 31, 2005
  2. paul j
    Replies:
    7
    Views:
    1,326
    paul j
    Apr 7, 2005
  3. Alick Lv
    Replies:
    1
    Views:
    3,880
  4. Moderator
    Replies:
    5
    Views:
    638
    loyola
    Feb 2, 2006
  5. Moderator
    Replies:
    0
    Views:
    608
    Moderator
    Jan 23, 2006
Loading...

Share This Page