Let Us GCC/Code 1.3

From Wikibooks, open books for an open world
< Let Us GCC
Jump to navigation Jump to search

Old Code[edit]

/* Just for fun. Author: Bozo */
main( )
{
    int num ;

    printf ( "Enter a number" ) ;
    scanf ( "%d", &num ) ;

    printf ( "Now I am letting you on a secret..." ) ;
    printf ( "You have just entered the number %d", num ) ;
}

New Code[edit]

/* Just for fun. Author: Bozo */
/* Editor GReaperEx Date: 19/7/2015 */

#include <stdio.h>

int main(void)
{
    int num;

    printf("Enter a number");
    scanf("%d", &num);

    printf("Now I am letting you on a secret...");
    printf("You have just entered the number %d", num);

    return 0;
}