0
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>

int main()
{
    char _name[30];
    int _age;


    printf("Hello Quester\n");
    printf("What is your name ?\n");
    scanf(_name);

    printf("...and what is your age, may i enquire esquire of peril and danger ahead\n");
    scanf  (_age);
    printf ("\nYour name is ",_name, ("  \nand your age is "), _age );
    printf("Press any key to exit");
    scanf;
    return 0;
}

Hi peeps, am using codeblocks , as i cant figure out Netbeans, but cant get this to compile without errors and warnings (particularly around line 16 and the scanf which i know i analogus to printf etc and cant understand it cos i am new, and stupid i guess)
I was wondering if i am still viewing this from a pascal like angle and have just not got to grips with c syntax yet.


Thanks for reading this and i know this is super basic, but help on this will really help me to get going. thanks again
Gruffy

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by gruffy321
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.