Wei Xin 20190912-2 Command Line

See the requirements for this job: https: //edu.cnblogs.com/campus/nenu/2019fall/homework/6582

1. familiar with the command line and console

Please develop applications in C d.exe, read commands from the console command line parameters, respectively, and print out the value of a, b, c in the console. Run the following example the effect of the form (6 points)

code show as below:

#include<stdio.h>
int main(int n,char *s[])
{
    int a,b,c;
    sscanf(s[1],"a=%d",&a);
    sscanf(s[2],"b=%d",&b);
    sscanf(s[3],"c=%d",&c);
    printf("%d\n\n%d\n\n%d",a,b,c);
}

Implementation of the results is as follows:

Guess you like

Origin www.cnblogs.com/Eustia/p/11543223.html