Article:
  C is for Cocoa
Subject:   Re: This made me install the dev tools
Date:   2003-07-23 21:07:56
From:   anonymous2
Response to: Re: This made me install the dev tools

Whoops! I should have tested the program before I hit 'Submit'. Here is the revised code:


#include <stdio.h>
int main()
{
//Computes our favorite number
int favoriteNumber = (3 * 4) / 2; /*is anyone's favorite number not an int? */
favoriteNumber = favoriteNumber + 2;


/* now let's tell the world
what our favorite number is! */
printf("My favorite number is %d!\n", favoriteNumber);
}

Full Threads Newest First

Showing messages 1 through 2 of 2.

  • Re: This made me install the dev tools
    2003-07-26 02:00:07  anonymous2 [View]

    misssing

    return (0);

    are we? :)
    • Re: This made me install the dev tools
      2003-09-03 19:48:45  anonymous2 [View]

      Not really. return 0; is optional in standard, modern C++ - and by extension, I'd assume the most recent C spec.

      Though gcc accepts some C++ syntaxes in C-compiling mode.