Ask coding questions

← Back to all posts
Coding help
SkyyCivil (120)

-I know a lot of people will not bother to look at this but I will be showing you guys everything I know
-I will update this code daily

Commentshotnewtop
NathanReyes1 (0)

how do you make an "if, and, else" statement?

[deleted]
  //This is the header ↓
  #include <stdio.h> //HEADER for all C codes
    //points out that you have integers ↓
    int main(void) 
    {  //this is the opening bracket this is where the code starts ↓
  printf("Hello World\n");
  return 0;
}

Please, before you get into spitting out code as tutorials, at least get your spacing sorted out. That is the basic C start code from repl.it and you still managed somehow to get it mixed up.

//This is the header ↓
#include <stdio.h> //HEADER for all C codes

Not true... this is just to declare output. Not all programs need this.

//points out that you have integers ↓
int main(void) {

Also not true. This is the main entry to the program and it's function prototype.
int at the beginning is the return type.
main is the name
(void) is the argument list

  //this is the opening bracket this is where the code starts ↓

Not even sure what this is trying to explain? the { opening
scope for the code block for the function?

  printf("Hello World\n");

  return 0;
}

Ughghg...

SkyyCivil (120)

@KelvinVerhey
I wasn't done so please stop the spam

SkyyCivil (120)

@SkyyCivil
this isn't helping anyone

TimothyAnderso1 (121)

also don't post this in the ask section, post it in the share section.

SkyyCivil (120)

Does that really matter?

TimothyAnderso1 (121)

@SkyyCivil yes, when this is a section made for answering others questions, not improperly written C, if you want to share, put this in the share section, or better yet the learn section. thanks for your time

SkyyCivil (120)

@TimothyAnderso1
Your welcome thank you for the help
I forgot about that :)

SkyyCivil (120)

@SkyyCivil
imma make a funny code challenge