It looks like you're new here. If you want to get involved, click one of these buttons!
for(begin_statement; while_condition; do_something)
{
Arguments;
}
#include <stdio.h>
int main()
{
int i;
for(i=1; i<5; i=i+1)
{
printf(\"Hello. Goodbye\n\");
}
return(0);
}
While i is less than five, do what's next in the for statement
./loop
Hello. Goodbye
Hello. Goodbye
Hello. Goodbye
Hello. Goodbye
Hello. Goodbye
#include <stdio.h>
int main()
{
int i;
for(i=1; i=5; i=i+1)
{
printf(\"Oh Noes! Infinite loop!!\n\");
}
return(0);
}
i is now equal to one. Now print the statement until i is equal to five. Great, printed 5 times and i equals 5. But oh wait, as long as i = 5 continue... looks like I need to continue with the loop
#include <stdio.h>
int main()
{
char userinput;
printf(\"Start your typing\n\");
printf(\"Press ` to stop\n\");
for(;;)
{
userinput = getchar();
if(userinput == '`')
{
break;
}
}
puts(\"Goodbye!\");
return(0);
}
for(i=1; i<5; i=i+1)
for(i=1; i<5; i++)
i=i+1
i+=5
i=i+5
+=
-=
/=
*=
#include <stdio.h>
int main()
{
int i;
i=1;
while(i<5)
{
printf(\"Helllllooooooooo\n\");
i++;
}
return(0);
}
begin_statement;
while(while_condition)
{
statement;
do_something;
}
#include <stdio.h>
int main()
{
int i;
i = 1;
while(i<10)
{
printf(\"Hello world!\n\");
i++
}
return(0);
}
I'm hoping to learn C / C++ soon. Just not sure which compiler I should use.
gcc -o code code.c
I might run linux on virtual box. But i got school in about 6 mins
lol talk later dude
I might run linux on virtual box. But i got school in about 6 mins
lol talk later dude
I would just dual-boot GNU/Linux and Winblows. Seriously, you wont learn anything from Winblows. It's security is poor, it's unstable and has many vulnerabilities, it doesn't teach you anything, and my 90 year old grandma can use Winblows. If you want to learn, you'll use GNU/Linux.
I might run linux on virtual box. But i got school in about 6 mins
lol talk later dude
I would just dual-boot GNU/Linux and Winblows. Seriously, you wont learn anything from Winblows. It's security is poor, it's unstable and has many vulnerabilities, it doesn't teach you anything, and my 90 year old grandma can use Winblows. If you want to learn, you'll use GNU/Linux.
I might run linux on virtual box. But i got school in about 6 mins
lol talk later dude
I would just dual-boot GNU/Linux and Winblows. Seriously, you wont learn anything from Winblows. It's security is poor, it's unstable and has many vulnerabilities, it doesn't teach you anything, and my 90 year old grandma can use Winblows. If you want to learn, you'll use GNU/Linux.
You can also take the time to actually learn how to use Windows though, beyond all the GUI.
I might run linux on virtual box. But i got school in about 6 mins
lol talk later dude
I would just dual-boot GNU/Linux and Winblows. Seriously, you wont learn anything from Winblows. It's security is poor, it's unstable and has many vulnerabilities, it doesn't teach you anything, and my 90 year old grandma can use Winblows. If you want to learn, you'll use GNU/Linux.
You can also take the time to actually learn how to use Windows though, beyond all the GUI.
It still sucks balls lol.