Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ENTERPRICE QUALITY C PROGRAMMING

Name: Anonymous 2014-02-05 13:10


#include"conio.h"
void main(){
        char name[10];
        char gender[10];
        char lastname[10];
        int age;
        printf("type your first name:");
        gets(name);
        printf("type your last name:");
        gets(lastname);
        printf("type your age:");
        scanf("%d", age);
        printf("type your gender:");
        gets(gender);
        getch();
        getch();
        if(gender=="female"){
                if(age<0){
                        printf("wrong age\r\n\r\n");
                }
                if(age==0){
                        printf("too little\r\n\r\n");
                }
                if(age>0&&age<10){
                        printf("this is the perfect age :3\r\n\r\n");
                }
                if(age>10&&age<17){
                        printf("what did you said? you are wet %s? let me change you\r\n\r\n", &firstname);
                }
        }else{
                printf("nohomo xD\r\n\r\n");
        }
        system("pause");
}

Name: Anonymous 2014-02-05 14:18

I did a code review for you. My opinion is that using

        char name[9];
        char gender[9];
        char lastname[9];


makes code shorter

Name: Anonymous 2014-02-05 14:42

top el

Name: Anonymous 2014-02-05 16:35

Use strncmp you fat fuck.

Name: Anonymous 2014-02-05 19:07

wut happend to:

else if { }

Name: Anonymous 2014-02-05 20:44

what if age is >17

Name: Anonymous 2014-02-05 22:22

my keks are in orbit

Name: Anonymous 2014-02-06 11:21

>>6
feel free to add

                if(age<=17){
                        printf("too old\r\n\r\n");
                }

Name: Anonymous 2014-02-06 22:58

>dem gets
>dat scanf
>dat non-portable system("pause")
>that fucking style
>void return type for main
>not #including stdio
>no address-of operator for scanf integer input
>dat strcmp with "=="
>not handling age > 17
>non-existent "firstname" variable
>dem windows newlines

10/10 would share cubicle with

Name: age 2014-03-01 13:40

age

Name: Anonymous 2014-03-01 18:02

Check my pedophilia.

Name: Anonymous 2014-03-02 7:18

>>11
>le pedophile sage

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List