The answer to your question would be option B- False
Explanation:
C++ Program to display month name according to the month number using Switch Statement
that's why called checkmonth
/* C Program to display month name according to the month number using Switch Statement */ #include<stdio.h> int main() { int n; printf("Month No : "); scanf("%d",&n); switch(n) { 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 Month number\nPlease try again ....\n"); break; } return 0; }
Answer:
That would be a cover letter.
Explanation:
Hope this helps!
Answer:
n=int(input("Enter number upto which you want to print prime numbers:\n"))#taking input of n in integer type..
for i in range(1,n): #looping over 1 to n.
pr=True #taking pr to be True..
for div in range(2,i): #looping over 2 to i..
if i%div==0:#if i is divisible by div then it is not prime
pr=False#making pr false
if pr and i!=1: #condition for printing
print(str(i))#printing the prime numbers..
Explanation:
In the python program we have checked for every integer up to n that is is not divisible by any integer between 2 to n-1 both inclusive if it is then it is not a prime number.