21 lines
295 B
C
21 lines
295 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
int age;
|
|
char name[10];
|
|
|
|
if ( argc != 3 )
|
|
{
|
|
printf ("USAGE: %s name age\n",argv[0]);
|
|
exit (0);
|
|
}
|
|
|
|
sscanf(argv[1],"%s",name);
|
|
sscanf(argv[2],"%d",&age);
|
|
|
|
printf ("age=%d name=%s\n", age, name);
|
|
|
|
return 0;
|
|
}
|