Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I don't know that this error stands for Itzhou17dteach-vw1: /home/2020/tzhou1/Wed Feb 19 15:42:32 EST 2020gcc-o simplecal] :c simplecalc.c simplecalc.c: In function 'main': simplecalc.c:15:16: error: switch

image text in transcribedimage text in transcribedI don't know that this error stands for

Itzhou17dteach-vw1: /home/2020/tzhou1/Wed Feb 19 15:42:32 EST 2020gcc-o simplecal] :c simplecalc.c simplecalc.c: In function 'main': simplecalc.c:15:16: error: switch quantity not an integer switch(argv[2]) { ANNN tzhou17@teach-vw1:/home/2020/tzhou17Wed Feb 19 15:42:33 EST 2020 #include #include int main(int argc, char* argv[]) { int ni, n2; if (argc!=4) printf("Error: usage is simplecalc "); exit(1); n1 = atoi(argv[1]); n2 = atoi(argv[3]); switch(argv[2]){ case '+': printf("%d", n1+n2); break; case '-': printf("%d", n1-n2); break; case '*': printf("%d", n1*n2); break; case '/': printf("%d", n12); 18, 16-30 23%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions