CS计算机代考程序代写 #include

#include
#include

int main(int argc, char **argv) {

if (argc < 4) { printf("\nProgram expects three arguments. \n Usage: main.s " "input0 input1 [1:Add,0:Mul] \n"); exit(1); } // argv[0] is program name ./a.out int i0 = atoi(argv[1]); int i1 = atoi(argv[2]); int i2 = atoi(argv[3]); if (i2 == 1) printf("Input 0: %d \n Input 1: %d \n: Result : %d ", i0, i1, i0 + i1); else printf("Input 0: %d \n Input 1: %d \n: Result : %d ", i0, i1, i0 * i1); }