saving . . . saved switch statement has been deleted. switch statement has been hidden .
switch statement
Title
Question
#include <stdio.h>
#include <stdlib.h>

int main()
{
int i;
int sq;
for(i=1; i<=10; i=i=1)
{

    switch(i%2){case o:
        printf("%d is even.\\n", even);
        braek;
    case 1:
        printf("m% d is odd.\\n",i);
        braek;
    }
        }
        scanf("%s");


    return 1;
}
this programm not running please tell me error

C-and-Cpp Functions 00-01 min 0-10 sec 18-10-16, 10:14 a.m. Rajee72v

Answers:

Hello Sir/madam

1. You have used even in line - 12 as a variable which is undeclared
2. the line -13 and line 16 contains braek which should be replace by "break"
3. you used "case o" in place of "case 0"(zero) in line 14

08-03-17, 1:29 p.m. aasinojiya


Log-in to answer to this question.