🔥Finding it Damn Hard to Understand C Programming? Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT! Try Programiz PRO for Free: bit.ly/master-c-programming
Programming Task: int month; printf("Enter numbers from 1 - 12: "); scanf("%d", &month); switch(month) { case 1: printf("January"); break; case 2: printf("February"); break; case 3: printf("March"); break; case 4: printf("April"); break; case 5: printf("May"); break; case 6: printf("June"); break; case 7: printf("July"); break; case 8: printf("August"); break; case 9: printf("September"); break; case 10: printf("October"); break; case 11: printf("November"); break; case 12: printf("December"); break; } return 0; }
Im at university in the second semester nad honestly I gave up on trying to understand my programing teacher since its a very old one and it seems like she explains only for herself, this is greatly helping me to get trough the c programing material and actually have a good understanding on it. Also the answer at the end is default.
iam very scared of learning c language when teached by professors in college..beacause they did not teach properly and they teach without patient..but i had clear idea about this language and able to code myself and i have good in tutorials..this is really because of you mam..your patient and calmness while teaching is very likeable...you taught it in good way...very good explanation...thanks for the good tutorial...make more videos..we are waiting to encourage and support you...
the code for task is: #include int main() { int number; printf("enter the number between 1 to 12 :"); scanf("%d", &number); switch (number) { case 1: printf("january"); break; case 2: printf("febuary"); break; case 3: printf("march"); break; case 4: printf("april"); break; case 5: printf("may"); break; case 6: printf("june"); break; case 7: printf("july"); break; case 8: printf("august"); break; case 9: printf("september"); break; case 10: printf("october"); break; case 11: printf("november"); break; case 12: printf("december"); break; default : printf("invalid number"); } return 0;
The video was very helpful, Can u please give some tips to improve our english speaking.... I can speak english but the accent you have mam i want that thing in my speaking also
Q. Which of the cases is executed in the following code? int number = 4; switch(number) { case 1: case 2: default: } A. case1 B. case 2 C. case 4 D. default
int main() { int number; printf("enter your number: "); scanf("%d",&number); switch(number){ case 1: printf("january"); break; case 2: printf("february"); break; case 3: printf("march"); break; default: printf("invalid number");
@Thrishul nath simple Explanation is, it's because a Case wasn't created for number 4 hence the reason if you enter 4 it will just run the default code .
In the calculator code, you used default statement in the break parentheses. as a result when you take an invalid operator input, it prints both the default part and result part. can u fix that?
Option D : Default #include int main() { int num; printf("Enter A Number : "); scanf("%d", &num); switch (num) { case 1: printf("January "); break; case 2: printf("February "); break; case 3: printf("March "); break; case 4: printf("April "); break; case 5: printf("May "); break; case 6: printf("June "); break; case 7: printf("July "); break; case 8: printf("August "); break; case 9: printf("September "); break; case 10: printf("October "); break; case 11: printf("November "); break; case 12: printf("December "); break; default: printf("Invalid Number "); break; } return 0; }
Programming Task: #include int main() { int month; printf("Enter a number for finding the month between 1- 12: "); scanf("%d", &month); switch (month) { case 1: printf("January"); break; case 2: printf("February"); break; case 3: printf("March"); break; case 4: printf("April"); break; case 5: printf("May"); break; case 6: printf("June"); break; case 7: printf("July"); break; case 8: printf("August"); break; case 9: printf("September"); break; case 10: printf("October"); break; case 11: printf("November"); break; case 12: printf("December"); break; default: printf("Invalid number. Please restart the program and try again."); } return 0; } D is the correct option.
12) Write a program using a “switch case” which ask a user to choose a number (1-3) from the display menu to perform the following functions: • For “1” calculate the square root of that number. • For “2” calculate the cube of that number. • For “3” print that number 50 times. • For “4” print the table of that number • In the case of none of the above cases, print invalid choice. 13) Using the nested switch case, write a program with a game option with a different hierarchy just for display options to control the game. can u solve these questions?
Hello! I just started learning C and coded like this to exercise 12: #include int main() { int number; printf("Enter a number from 1 to 4: "); scanf_s("%d", &number); double number1; printf("Enter any number: "); scanf_s("%lf", &number1); double square = (number1 * number1); double cube = (number1 * number1 * number1); double times50 = (number1); switch (number) { case 1: printf("%lf", square); break; case 2: printf("%lf", cube); break; case 3: printf("%.2lf", times50); break; case 4: printf("For now, I can't do that"); break; default: printf("Invalid number"); } } I was able to complete only the first two conditions. If you know how to complete the whole exercise, could you please send me how you did that?
@@bullying3831 HI, nice work here... But I feel like instead of multiplying the number by itself, u could use exponential so in that case u can calculate the number fifty times.
#include #include int main() { int choice, number; printf("Choose an option from the menu: "); printf("1. Calculate the square root of a number "); printf("2. Calculate the cube of a number "); printf("3. Print a number 50 times "); printf("4. Print the table of a number "); printf("Enter your choice (1-4): "); scanf("%d", &choice); switch (choice) { case 1: printf("Enter a number: "); scanf("%d", &number); printf("Square root of %d is %lf ", number, sqrt(number)); break; case 2: printf("Enter a number: "); scanf("%d", &number); printf("Cube of %d is %d ", number, number * number * number); break; case 3: printf("Enter a number: "); scanf("%d", &number); printf("Printing %d 50 times: ", number); for (int i = 0; i < 50; i++) { printf("%d ", number); } printf(" "); break; case 4: printf("Enter a number: "); scanf("%d", &number); printf("Table of %d: ", number); for (int i = 1; i
Programming task: #include int main() { printf("Choose a number from 1-12: "); int number; scanf("%d", &number); switch(number) { case 1: printf("January"); break; case 2: printf("February"); break; case 3: printf("March"); break; case 4: printf("April"); break; case 5: printf("May"); break; case 6: printf("June"); break; case 7: printf("July"); break; case 8: printf("August"); break; case 9: printf("September"); break; case 10: printf("October"); break; case 11: printf("November"); break; case 12: printf("December"); break; default: printf("Your dumbass can't read."); break; } return 0; }
//using switch case to view month name by entering number #include int main(){ int number; printf("Enter a number between 1 to 12: "); scanf("%d", &number); switch(number){ case 1: printf("January"); break; case 2: printf("febuary"); break;
int number; printf("Enter a number between 1 to 12: "); scanf("%d", &number); switch(number) { case 1: printf("Enero "); break; case 2: printf("Febrero "); break; case 3: printf("Marzo "); break; case 4: printf("Abril "); break; case 5: printf("Mayo "); break; case 6: printf("Junio "); break; case 7: printf("Julio "); break; case 8: printf("Agosto "); break; case 9: printf("Septiembre "); break; case 10: printf("Octubre "); break; case 11: printf("Noviembre "); break; case 12: printf("Diciembre "); break; default: printf("Invalid Number"); } return 0; }
I'm sorry for the mistakes. I was drinking Budweiser hahawhwhawhh! Thaks a lot from Brazil! // Online C compiler to run C program online #include int main() { int number; printf("Hello, my name is Nemesys, choose one number and input it, please..."); scanf("%d",&number); switch(number){ case(1): printf("The month is January"); break; case(2): printf("The month is February"); break; case(3): printf("The month is March"); break; case(4): printf("The month is April"); break; case(5): printf("The month is May"); break; case(6): printf("The month is June"); break; case(7): printf("The month is Jully"); break; case(8): printf("The month is August"); break; case(9): printf("The month is September"); break; case(10): printf("The month is October"); break; case(11): printf("The month is November"); break; case(12): printf("The month is December"); break; default:(printf("stop drinking, you're crazy now ahahhahah")); break; } return 0; }
Madam task program complete include int main() { int num; printf("Enter month numbers 1 to 12::"); scanf("%d",&num); switch(num) { case 1: printf("JANUARY"); break; case 2: printf("FEBRUARY"); break; case 3: printf("MARCH"); break; case 4: printf("APRIL"); break; case 5: printf("MAY"); break; case 6: printf("JUNE"); break; case 7: printf("JULY"); break; case 8: printf("AUGUST"); break; case 9: printf("SEPTUMBER"); break; case 10: printf("OCTOMBAR"); break; case 11: printf("NOVEMBER"); break; case 12: printf("DECEMBER"); break; default: printf("INVAILD"); break; }
#include int main() { int number; printf("enter the number between 1 to 12:"); scanf("%d",&number); switch(number) { case 1: printf(" january"); break; case 2: printf("february"); break; case 3: printf("March"); break; case 4: printf("April"); break; case 5: printf("may"); break; case 6: printf("June"); break; case 7: printf("July"); break; case 8: printf("august"); break; case 9: printf("september"); break; case 10: printf("October"); break; case 11: printf("November"); break; case 12: printf("December"); break; default: printf("invalid choice"); } return 0; } This is the programming task mam
#include int main () { int num; printf("Enter the number from 1 to 12: "); scanf("%d", &num); switch(num) { case 1: printf("January"); break; case 2: printf("February"); break; case 3: printf("March"); break; case 4: printf("April"); break; case 5: printf("May"); break; case 6: printf("June"); break; case 7: printf("July"); break; case 8: printf("August"); break; case 9: printf("September"); break; case 10: printf("October"); break; case 11: printf("November"); break; case 12: printf("December"); break; default: printf("Invalid number"); } return 0; }
#include int main () { int month; printf("enter numbers from 1 to 12:"); scanf("%d", &month); switch(month) { case 1: printf("jan"); break; case 2: printf("feb"); break; case 3: printf("mar"); break; case 4: printf("apr"); break; case 5: printf("may"); break; case 6: printf("jun"); break; case 7: printf("jul"); break; case 8: printf("aug"); break; case 9: printf("sep"); break; case 10: printf("oct"); break; case 11: printf("nov"); break; case 12: printf("dec"); break; default: printf("invalid"); } return 0; }
include int main(){ int num; printf("Enter a number between 1 to 12: "); scanf("%d", &num); switch(num){ case 1: printf("January"); break; case 2: printf("February"); break; case 3: printf ("March"); break; case 4: printf("April"); break; case 5: printf("May"); break; case 6: printf("June"); break; case 7: printf("July"); break; case 8: printf("August"); break; case 9: printf("September"); break; case 10: printf("October"); break; case 11: printf("November"); break; case 12: printf("December"); break; default: printf("Invalid number"); } return 0; }
PROGRAMMING TASK #include int main() { int a; printf("select a month number [1 to 12]: "); scanf("%d",&a); switch(a) { case 1:printf("its january!");break; case 2:printf("its february!");break; case 3:printf("its march!");break; case 4:printf("its april!");break; case 5:printf("its may!");break; case 6:printf("its june!");break; case 7:printf("its july!");break; case 8:printf("its august!");break; case 9:printf("its september!");break; case 10:printf("its october!");break; case 11:printf("its november!");break; case 12:printf("its december!");break; default:printf("invalid entry");break; } THANK YOU!!!!
🔥Finding it Damn Hard to Understand C Programming?
Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!
Try Programiz PRO for Free: bit.ly/master-c-programming
Programming Task:
int month;
printf("Enter numbers from 1 - 12: ");
scanf("%d", &month);
switch(month) {
case 1:
printf("January");
break;
case 2:
printf("February");
break;
case 3:
printf("March");
break;
case 4:
printf("April");
break;
case 5:
printf("May");
break;
case 6:
printf("June");
break;
case 7:
printf("July");
break;
case 8:
printf("August");
break;
case 9:
printf("September");
break;
case 10:
printf("October");
break;
case 11:
printf("November");
break;
case 12:
printf("December");
break;
}
return 0;
}
thanks bro...
We hv to write a default statement for numbers entered out of tht range !
compiler error bro. you not defind c header file #include
Im at university in the second semester nad honestly I gave up on trying to understand my programing teacher since its a very old one and it seems like she explains only for herself, this is greatly helping me to get trough the c programing material and actually have a good understanding on it. Also the answer at the end is default.
I wish my professor explains like you!
Professors will not, they're no more than an intellect maniac.
pretty good definition at the beginning . Explains where you should put what for beginners.
really useful :)
please increase the frequency of these lectures
iam very scared of learning c language when teached by professors in college..beacause they did not teach properly and they teach without patient..but i had clear idea about this language and able to code myself and i have good in tutorials..this is really because of you mam..your patient and calmness while teaching is very likeable...you taught it in good way...very good explanation...thanks for the good tutorial...make more videos..we are waiting to encourage and support you...
the code for task is:
#include
int main() {
int number;
printf("enter the number between 1 to 12 :");
scanf("%d", &number);
switch (number) {
case 1:
printf("january");
break;
case 2:
printf("febuary");
break;
case 3:
printf("march");
break;
case 4:
printf("april");
break;
case 5:
printf("may");
break;
case 6:
printf("june");
break;
case 7:
printf("july");
break;
case 8:
printf("august");
break;
case 9:
printf("september");
break;
case 10:
printf("october");
break;
case 11:
printf("november");
break;
case 12:
printf("december");
break;
default :
printf("invalid number");
}
return 0;
}
correct bro
Good and simple to understand. Keep doing it, we need it. I'm grateful for everyone who making this happen.
Mam you exclaims very well and i can understand better than my teacher.
Nice presentation, simple and easily understandable 👍
Every thing is easy if taught by this beautiful ----------- ; KEEP UP THE GOOD WORK ;
I love you videos, straight to the point, clear and organized
By how much time full C course will be completed??
Di can you explain for what getter and setter are are used in object oriented programming
set->input and get->print
The video was very helpful, Can u please give some tips to improve our english speaking.... I can speak english but the accent you have mam i want that thing in my speaking also
English is more of practice, listen more of the accent you want to learn and use English more than your Mother tongue.
This is so easy to understand. Thank you
Q. Which of the cases is executed in the following code?
int number = 4;
switch(number) {
case 1:
case 2:
default:
}
A. case1
B. case 2
C. case 4
D. default
D
I think the answer might be D.
D. default
D) Default
Its default
int main() {
int number;
printf("enter your number: ");
scanf("%d",&number);
switch(number){
case 1:
printf("january");
break;
case 2:
printf("february");
break;
case 3:
printf("march");
break;
default:
printf("invalid number");
}
return 0;
}
We have to print all 12 months. Not only 3.
I love the way u Teach us ❤ Thank u
concise n comprehensive, thanks.
Answer is option d
Default
Nyc Sister❤️ Thankyou Alot Sister Best of luck☺️💯
thank you very much padma ji
I leave this comment for everyone who benefits to leave a like to remind me of this awesome content
From where you copied this simple calculator program its not working
Add printf("%lf", result) at the end
@@nenastemis9580 where at the end ?
Default will be executed, so the answer is D
Can I know how?
@Thrishul nath simple Explanation is, it's because a Case wasn't created for number 4 hence the reason if you enter 4 it will just run the default code .
In the calculator code, you used default statement in the break parentheses.
as a result when you take an invalid operator input, it prints both the default part and result part.
can u fix that?
Thank you for this lesson!!
Well Explained, u never disappoint 10/10 for me❤😊
Here I come ❤️❤️
@programizstudios can we use number
Thank you so much
It has helped me a lot
Option D : Default
#include
int main()
{
int num;
printf("Enter A Number : ");
scanf("%d", &num);
switch (num)
{
case 1:
printf("January ");
break;
case 2:
printf("February ");
break;
case 3:
printf("March ");
break;
case 4:
printf("April ");
break;
case 5:
printf("May ");
break;
case 6:
printf("June ");
break;
case 7:
printf("July ");
break;
case 8:
printf("August ");
break;
case 9:
printf("September ");
break;
case 10:
printf("October ");
break;
case 11:
printf("November ");
break;
case 12:
printf("December ");
break;
default:
printf("Invalid Number ");
break;
}
return 0;
}
D is the correct answer ❤❤
Programming Task:
#include
int main() {
int month;
printf("Enter a number for finding the month between 1- 12: ");
scanf("%d", &month);
switch (month) {
case 1:
printf("January");
break;
case 2:
printf("February");
break;
case 3:
printf("March");
break;
case 4:
printf("April");
break;
case 5:
printf("May");
break;
case 6:
printf("June");
break;
case 7:
printf("July");
break;
case 8:
printf("August");
break;
case 9:
printf("September");
break;
case 10:
printf("October");
break;
case 11:
printf("November");
break;
case 12:
printf("December");
break;
default:
printf("Invalid number. Please restart the program and try again.");
}
return 0;
}
D is the correct option.
what is the default code of the simple calculator?
Super thank you so much mam!!🙏🏻
Without using the print function in the switch case body, my program was not working.. any suggestions on why that is so?
you have to use the print option because she seems to be using a different compiler. So you need to introduce the print function in there
10:54 answer is default!
12) Write a program using a “switch case” which ask a user to choose a number (1-3) from the display menu to perform the following functions:
• For “1” calculate the square root of that number.
• For “2” calculate the cube of that number.
• For “3” print that number 50 times.
• For “4” print the table of that number
• In the case of none of the above cases, print invalid choice.
13) Using the nested switch case, write a program with a game option with a different hierarchy just for display options to control the game.
can u solve these questions?
Hello! I just started learning C and coded like this to exercise 12:
#include
int main()
{
int number;
printf("Enter a number from 1 to 4: ");
scanf_s("%d", &number);
double number1;
printf("Enter any number: ");
scanf_s("%lf", &number1);
double square = (number1 * number1);
double cube = (number1 * number1 * number1);
double times50 = (number1);
switch (number) {
case 1:
printf("%lf", square);
break;
case 2:
printf("%lf", cube);
break;
case 3:
printf("%.2lf", times50);
break;
case 4:
printf("For now, I can't do that");
break;
default:
printf("Invalid number");
}
}
I was able to complete only the first two conditions. If you know how to complete the whole exercise, could you please send me how you did that?
@@bullying3831 HI, nice work here... But I feel like instead of multiplying the number by itself, u could use exponential so in that case u can calculate the number fifty times.
#include
#include
int main() {
int choice, number;
printf("Choose an option from the menu:
");
printf("1. Calculate the square root of a number
");
printf("2. Calculate the cube of a number
");
printf("3. Print a number 50 times
");
printf("4. Print the table of a number
");
printf("Enter your choice (1-4): ");
scanf("%d", &choice);
switch (choice) {
case 1:
printf("Enter a number: ");
scanf("%d", &number);
printf("Square root of %d is %lf
", number, sqrt(number));
break;
case 2:
printf("Enter a number: ");
scanf("%d", &number);
printf("Cube of %d is %d
", number, number * number * number);
break;
case 3:
printf("Enter a number: ");
scanf("%d", &number);
printf("Printing %d 50 times:
", number);
for (int i = 0; i < 50; i++) {
printf("%d ", number);
}
printf("
");
break;
case 4:
printf("Enter a number: ");
scanf("%d", &number);
printf("Table of %d:
", number);
for (int i = 1; i
Thanks ma'am
Option D
Programming task:
#include
int main() {
printf("Choose a number from 1-12: ");
int number;
scanf("%d", &number);
switch(number) {
case 1:
printf("January");
break;
case 2:
printf("February");
break;
case 3:
printf("March");
break;
case 4:
printf("April");
break;
case 5:
printf("May");
break;
case 6:
printf("June");
break;
case 7:
printf("July");
break;
case 8:
printf("August");
break;
case 9:
printf("September");
break;
case 10:
printf("October");
break;
case 11:
printf("November");
break;
case 12:
printf("December");
break;
default:
printf("Your dumbass can't read.");
break;
}
return 0;
}
Happy programming..!
Tq🙏🙏❤️❤️
D default case
hi ! why didn't we write printf("%lf",result)
#include
int main() {
int month;
printf("enter number");
scanf("%d", &month);
switch (month)
{
case 1:
printf("January");
break;
case 2:
printf("Feb");
break;
default:
printf("Invalid");
break;
}
return 0;
}
Well Explained Madam
8:45 ,Can we use a keyword as a variable name?
//using switch case to view month name by entering number
#include
int main(){
int number;
printf("Enter a number between 1 to 12: ");
scanf("%d", &number);
switch(number){
case 1:
printf("January");
break;
case 2:
printf("febuary");
break;
case 3:
printf("March");
break;
case 4:
printf("April");
break;
case 5:
printf("May");
break;
case 6:
printf("June");
break;
case 7:
printf("July");
break;
case 8:
printf("August");
break;
case 9:
printf("September");
break;
case 10:
printf("October");
break;
case 11:
printf("November");
break;
case 12:
printf("December");
break;
default:
printf("Invalid Number");
}
return 0;
}
Assalamoalaikum dedi
int number;
printf("Enter a number between 1 to 12: ");
scanf("%d", &number);
switch(number) {
case 1:
printf("Enero ");
break;
case 2:
printf("Febrero ");
break;
case 3:
printf("Marzo ");
break;
case 4:
printf("Abril ");
break;
case 5:
printf("Mayo ");
break;
case 6:
printf("Junio ");
break;
case 7:
printf("Julio ");
break;
case 8:
printf("Agosto ");
break;
case 9:
printf("Septiembre ");
break;
case 10:
printf("Octubre ");
break;
case 11:
printf("Noviembre ");
break;
case 12:
printf("Diciembre ");
break;
default:
printf("Invalid Number");
}
return 0;
}
I'm sorry for the mistakes. I was drinking Budweiser hahawhwhawhh! Thaks a lot from Brazil!
// Online C compiler to run C program online
#include
int main() {
int number;
printf("Hello, my name is Nemesys, choose one number and input it, please...");
scanf("%d",&number);
switch(number){
case(1):
printf("The month is January");
break;
case(2):
printf("The month is February");
break;
case(3):
printf("The month is March");
break;
case(4):
printf("The month is April");
break;
case(5):
printf("The month is May");
break;
case(6):
printf("The month is June");
break;
case(7):
printf("The month is Jully");
break;
case(8):
printf("The month is August");
break;
case(9):
printf("The month is September");
break;
case(10):
printf("The month is October");
break;
case(11):
printf("The month is November");
break;
case(12):
printf("The month is December");
break;
default:(printf("stop drinking, you're crazy now ahahhahah"));
break;
}
return 0;
}
Madam task program complete include
int main()
{ int num;
printf("Enter month numbers 1 to 12::");
scanf("%d",&num);
switch(num)
{
case 1:
printf("JANUARY");
break;
case 2:
printf("FEBRUARY");
break;
case 3:
printf("MARCH");
break;
case 4:
printf("APRIL");
break;
case 5:
printf("MAY");
break;
case 6:
printf("JUNE");
break;
case 7:
printf("JULY");
break;
case 8:
printf("AUGUST");
break;
case 9:
printf("SEPTUMBER");
break;
case 10:
printf("OCTOMBAR");
break;
case 11:
printf("NOVEMBER");
break;
case 12:
printf("DECEMBER");
break;
default:
printf("INVAILD");
break;
}
return 0;
}
how did you print the result?
#include
int main()
{
int number;
printf("enter the number between 1 to 12:");
scanf("%d",&number);
switch(number)
{
case 1:
printf(" january");
break;
case 2:
printf("february");
break;
case 3:
printf("March");
break;
case 4:
printf("April");
break;
case 5:
printf("may");
break;
case 6:
printf("June");
break;
case 7:
printf("July");
break;
case 8:
printf("august");
break;
case 9:
printf("september");
break;
case 10:
printf("October");
break;
case 11:
printf("November");
break;
case 12:
printf("December");
break;
default:
printf("invalid choice");
}
return 0;
}
This is the programming task mam
#include
int main ()
{
int num;
printf("Enter the number from 1 to 12: ");
scanf("%d", &num);
switch(num) {
case 1:
printf("January");
break;
case 2:
printf("February");
break;
case 3:
printf("March");
break;
case 4:
printf("April");
break;
case 5:
printf("May");
break;
case 6:
printf("June");
break;
case 7:
printf("July");
break;
case 8:
printf("August");
break;
case 9:
printf("September");
break;
case 10:
printf("October");
break;
case 11:
printf("November");
break;
case 12:
printf("December");
break;
default:
printf("Invalid number");
}
return 0;
}
Option (d)
Ur the best 😚
mam your explanation was so clear and very easy to understant thank you mam for providing such beatiful classes
great video
// Online C compiler to run C program online
#include
int main() {
printf("Thank you programiz team");
return 0;
}
D is the answer.
D.Default
great vidio
Welll done
Default
answer:optio D
It shows case and break statement within loop or switch..
Thank you!! by the way you are sooo pretty
Programming task:
#include
Int main(){
Char operator;
Printf("choose an operator['+', '_', '*', '/']; ");
Scanf("%c " ,&operator);
Double num1,num2;
Printf("enter first number: ");
Scanf("%lf", &num1);
Printf("enter second number: ");
Scanf("%lf" ,&num2);
Double result;
Switch(operator){
Case '+' :
Printf("%.0lf+%.0lf=%.0lf", num1 , num2, num1+ num2);
Break;
Case '-' :
Printf("%.0lf-%.0lf=%.0lf" ,num1, num2, num1- num2);
Break;
}
Return 0;
}
Answer is D) default
D =4
I did the initial part but the output when I try to add up two numbers no results will come out.
Did you add
Printf(“%.2lf”, result);
Add it before the return 0
the answer is d for the quiz
Answer:d
Option is:D
#include
int main () {
int month;
printf("enter numbers from 1 to 12:");
scanf("%d", &month);
switch(month) {
case 1:
printf("jan");
break;
case 2:
printf("feb");
break;
case 3:
printf("mar");
break;
case 4:
printf("apr");
break;
case 5:
printf("may");
break;
case 6:
printf("jun");
break;
case 7:
printf("jul");
break;
case 8:
printf("aug");
break;
case 9:
printf("sep");
break;
case 10:
printf("oct");
break;
case 11:
printf("nov");
break;
case 12:
printf("dec");
break;
default:
printf("invalid");
}
return 0;
}
where is printf statement to print the results
Why we use return zero
Answers is D madam
Plz show full code of the calculator
D is answer.
Answer is d
Answer is D . default.
Answer is "D"
option d
include
int main(){
int num;
printf("Enter a number between 1 to 12: ");
scanf("%d", &num);
switch(num){
case 1:
printf("January");
break;
case 2:
printf("February");
break;
case 3:
printf ("March");
break;
case 4:
printf("April");
break;
case 5:
printf("May");
break;
case 6:
printf("June");
break;
case 7:
printf("July");
break;
case 8:
printf("August");
break;
case 9:
printf("September");
break;
case 10:
printf("October");
break;
case 11:
printf("November");
break;
case 12:
printf("December");
break;
default:
printf("Invalid number");
}
return 0;
}
please use ezay English or hindi
The answer is D. default.
D. default
PROGRAMMING TASK
#include
int main()
{
int a;
printf("select a month number [1 to 12]: ");
scanf("%d",&a);
switch(a)
{
case 1:printf("its january!");break;
case 2:printf("its february!");break;
case 3:printf("its march!");break;
case 4:printf("its april!");break;
case 5:printf("its may!");break;
case 6:printf("its june!");break;
case 7:printf("its july!");break;
case 8:printf("its august!");break;
case 9:printf("its september!");break;
case 10:printf("its october!");break;
case 11:printf("its november!");break;
case 12:printf("its december!");break;
default:printf("invalid entry");break;
}
THANK YOU!!!!
d) default
d. default
Option d mam!!
Bhavana Anu How you select option D is correct answer !!!
Quiz: D
if
is not given in scanf("%c",operator) my programm stops just before that
What if I want to subtract the first number from the second number..?
Did u find out the answer?