Ask your own question, for FREE!
Computer Science 23 Online
MARC:

Program http://prntscr.com/lc1psl

MARC:

@Ultrilliam

Ultrilliam:

Any ideas on how to start?

Ultrilliam:

@MARC

MARC:

http://prntscr.com/lc1wig

MARC:

Is it correct? :O

Ultrilliam:

Not quite, it first wants someone to give the univ, name, gender throw those into variables, printf the name and univ, do a if check for gender (which should be either m or f), if it equals neither printf a error If it's m, printf what it says, otherwise printf the female one. Make sense? Also for any future people I'm going to attach the image in the question here.

1 attachment
MARC:

yeah,makes sense aite,editing again XD

mhchen:

rename the 'gender' variable because you can only declare it once. You can do char genderMale = 'F'; char genderFemale = 'M;

Ultrilliam:

While true^ That's still unnecessary since it's unnecessary towards the end goal to even define it as F or M

Ultrilliam:

(Except when given by the user)

MARC:

http://prntscr.com/lc25bo

MARC:

http://prntscr.com/lc25et

Ultrilliam:

"hu" instead of "hi"

mhchen:

I tried that myself with https://www.onlinegdb.com/online_c_compiler But it didn't display my 'name' correctly. I've like never used the gets() function, all I use is scanf.

mhchen:

Have you tested the code with your own compiler?

Ultrilliam:

^I actually didn't test, because I didn't want to type it out (cause I'm actually coding something right now) x'D \```c code here \``` ^For future reference pls

MARC:

yeah,I did It works :D

MARC:

Thanks Ultrilliam and mhchen

Ultrilliam:

No problem :)

mhchen:

```c int main(){ } ``` oh cool

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!