17 lines
237 B
C
17 lines
237 B
C
// Prints a command-line argument
|
|
|
|
#include <cs50.h>
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, string argv[])
|
|
{
|
|
if (argc == 2)
|
|
{
|
|
printf("hello, %s\n", argv[1]);
|
|
}
|
|
else
|
|
{
|
|
printf("hello, world\n");
|
|
}
|
|
}
|