Computer Science, asked by adityamani85, 2 months ago

What is wrong with the following code?

switch (x)

{


case 1 : n1 = 10 ;

n2 = 20 ;

case 2 : n3 = 30 ;

break ;​

Answers

Answered by Anonymous
0

Answer:

these codes are correct

Explanation:

#include <stdio.h>

void main()

{

double ch;

printf("enter a value between 1 to 2:");

scanf("%lf", &ch);

switch (ch)

{

case 1:

printf("1");

break;

case 2:

printf("2");

break;

}

}

Similar questions