if (x<y)
{
printf("x is less than y\n");
}
else if (x>y)
{
printf("x is greater than y\n");
}
else
{
printf("x is equal to y\n");
}
Thursday, August 27, 2020
if, else if, else if
if (x<y)
{
printf("x is less than y \n");
}
else if (x>y)
{
printf("x is greater than y \n");
}
else if (x==y)
{
printf("x is equal to y \n");
}
{
printf("x is less than y \n");
}
else if (x>y)
{
printf("x is greater than y \n");
}
else if (x==y)
{
printf("x is equal to y \n");
}
make - included in Linux, MacOS, and Windows these days
the make program is now included with these operating systems
make string
when you type this command, the program "make" will look for a file called "string.c" to compile into the executable "string"
if you type the command "make hello" , the program make will look for a file called "hello.c" and compile it into the executable "hello"
[Source: Harvard, CS50]
if you type the command "make hello" , the program make will look for a file called "hello.c" and compile it into the executable "hello"
[Source: Harvard, CS50]
clang -o string string.c -lcs50
in addition to " #include <cs50.h> "
you also have to "-lcs50"
where "l" stands for "link"
[Source: Harvard, CS50]
you also have to "-lcs50"
where "l" stands for "link"
[Source: Harvard, CS50]
Subscribe to:
Posts (Atom)