Computer Science, asked by prihashagamer1, 1 month ago

#include

int main()
{
int rating;
printf("Enter your rating according to your experience\n");
scanf("$d", &rating);

switch (rating)
{
case '1': printf("Your rating is 1\n");
break;
case '2': printf("Your rating is 2\n");
break;
case '3': printf("Your rating is 3\n");
break;
case '4': printf("Your rating is 4\n");
break;
case '5': printf("Your rating is 5\n");
break;
default: printf("Your rating is invalid\n");
break;
}
return 0;
}



In this c program im trying to make a system for rating up to 5 from 1 but the result is only executes the default one
pls help me with this c program.

Answers

Answered by madhav78125
0

Answer:

E-Commerce refers to the performing online commercial activities, transactions over internet. E-Business refers to performing all type of business activities through internet. ... In e-commerce transactions are limited. In e-business transactions are not limited.

Explanation:

{

int rating;

printf("Enter your rating according to your experience\n");

scanf("$d", &rating);

switch (rating)

{

case '1': printf("Your rating is 1\n");

break;

case '2': printf("Your rating is 2\n");

break;

case '3': printf("Your rating is 3\n");

break;

case '4': printf("Your rating is 4\n");

break;

case '5': printf("Your rating is 5\n");

break;

default: printf("Your rating is invalid\n");

break;

}

return 0

{

int rating;

printf("Enter your rating according to your experience\n");

scanf("$d", &rating);

switch (rating)

{

case '1': printf("Your rating is 1\n");

break;

case '2': printf("Your rating is 2\n");

break;

case '3': printf("Your rating is 3\n");

break;

case '4': printf("Your rating is 4\n");

break;

case '5': printf("Your rating is 5\n");

break;

default: printf("Your rating is invalid\n");

break;

}

return 0

Answered by ponwinsiya
0

Answer:

#include <stdio.h>

int main()

{

int rating;

printf("Enter your rating according to your experience\n");

scanf("$d", &rating);

switch (rating)

{

case '1': printf("Your rating is 1\n");

break;

case '2': printf("Your rating is 2\n");

break;

case '3': printf("Your rating is 3\n");

break;

case '4': printf("Your rating is 4\n");

break;

case '5': printf("Your rating is 5\n");

break;

default: printf("Your rating is invalid\n");

break;

}

return 0;

}

Similar questions