int main (int argc, char *argv[]) { char *host; int option , num1 , num2 ,num3; char name[100]; if (argc < 2) { printf ("usage: %s server_host\n", argv[0]); exit (1); } host = argv[1]; printf("please select your choice\n"); printf("1.Add\n2.multiply\n3.Display string\n" ); scanf("%d", &option); if(option == 1 ) { printf("enter num1 \n" ); scanf("%d", &num1); printf("entet num2\n"); scanf("%sd\n",&num2 ); add_prog_1 (host, num1 , num2); } else if(option == 2 ) { } else if(option == 3 ) //string_prog_1 (host); //multiply_prog_1 (host); exit (0); }
int main (int argc, char *argv[]) { char *host; if (argc < 2) { printf ("usage: %s server_host\n", argv[0]); exit (1); } host = argv[1]; add_prog_1 (host); exit (0); }