answersLogoWhite

0

DisplayMonth( int month ) //base 0

{

switch( month )

{

case 0: printf("January\n"); break;

case 1: printf("February\n"); break;

case 2: printf("March\n"); break;

.... and so on

}

}

enjoy

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

Write a program in COBOL to find the largest of N number?

identification division. program-id. greatest. environment division. data division. working-storage section. 77 a pic 999. 77 b pic 999. 77 c pic 999. procedure division. greatest. display "ENTER THE THREE NUMBERS:". accept a. accept b. accept c. if a > b and a > c display a "is greatest" else if b > c display b "is greatest" else display c "is greatest". display " thank you". stop run.


Draw a flowchart to accept 3 numbers and display the largest number?

draw a flowchart to display the first tenth even number


What function enables the user to input information while the program is being executed in c?

The scanf() function is a commonly used function to input information during the execution of a program. scanf() function has its prototype in the stdio.h header file. To accept and display a number: int num; printf("Enter a number: "); scanf("%d",&num); printf("You entered %d",num); To accept and display a character, replace %d with %c and make num a character variable [char]. Plus: gets, fgets, read, fread, getchar, getc, fgetc, getch...


Write a program in shell script to display odd number from 0 to 100?

seq 1 2 99


write a program that will display one if you enter any number without it will display zero in c?

You can use the following C program to display "1" if a user enters any non-zero number, and "0" if the entered number is zero: #include <stdio.h> int main() { int num; printf("Enter a number: "); scanf("%d", &num); if (num != 0) { printf("1\n"); } else { printf("0\n"); } return 0; } This program reads an integer from the user and checks if it is non-zero or zero, then prints the corresponding output.

Related Questions

Write a program in COBOL to find the largest of N number?

identification division. program-id. greatest. environment division. data division. working-storage section. 77 a pic 999. 77 b pic 999. 77 c pic 999. procedure division. greatest. display "ENTER THE THREE NUMBERS:". accept a. accept b. accept c. if a > b and a > c display a "is greatest" else if b > c display b "is greatest" else display c "is greatest". display " thank you". stop run.


Draw a flowchart to accept 3 numbers and display the largest number?

draw a flowchart to display the first tenth even number


Write a program which takes any number of days from the user the program should display the number of years number of months formed by these days as well as the remaining days?

Write a program which takes any number of days from the user. the program should display the number of years, number of months formed by these days as well as the remaining days.


What is the maximum number of pages that the print preview option can display at a time?

20


Write a program to display the name of days when a user enters a number?

write a program to display your name age class schoolname e-mail 2hobby based on choice


How do you write the pseudo codes that will accept 7 numbers and display their sum?

Start accept 7 number calculate sum print sum stop


Write a c program using while loop to accept a number check and display message whether number is perfect or not?

The program is here guys.......... //Finding whether the given number is perfect or not //Starts here #include<stdio.h> void main() { int i=1,temp=0,number; scanf("%d",&number); while(i<=number/2){ if(number%i==0) temp+=i; i++; } if(temp==number) printf("Its a perfect number"); else printf("Its not a perfect number"); } //ends here


What function enables the user to input information while the program is being executed in c?

The scanf() function is a commonly used function to input information during the execution of a program. scanf() function has its prototype in the stdio.h header file. To accept and display a number: int num; printf("Enter a number: "); scanf("%d",&num); printf("You entered %d",num); To accept and display a character, replace %d with %c and make num a character variable [char]. Plus: gets, fgets, read, fread, getchar, getc, fgetc, getch...


Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


Make a program that will accept any number n between 20-50 and another number x between 1-5 Then the program will display all numbers from 1-n that is divisible by x?

/* a number divisible by x should be a multiple of x */ int i, n,x; scanf ("%d", &n); scanf ("%d",&x); for(i=x;i =< n;i+=x) { printf ("%d", x); }


Write a program in shell script to display odd number from 0 to 100?

seq 1 2 99


Write a java program to display the number is prime or not?

Simply use a for loop (i) that runs from 2 to N-1. Checking if N % i 0 then its a prime number.