Answer:
To check if the year comes under each 100th year, lets check if the remainder when dividing with 100 is 0 or not.
Similarly check for 400th year and multiple 0f 4. The following C program describes the function.
#include<stdio.h>
#include<stdbool.h>
bool is_leap_year(int year);
void main()
{
int y;
bool b;
printf("Enter the year in yyyy format: e.g. 1999 \n");
scanf("%d", &y); // taking the input year in yyyy format.
b= is_leap_year(y); //calling the function and returning the output to b
if(b==true)
{
printf("Thae given year is a leap year \n");
}
else
{
printf("The given year is not a leap year \n");
}
}
bool is_leap_year(int year)
{
if(year%100==0) //every 100th year
{
if(year%400==0) //every 400th year
{
return true;
}
else
{
return false;
}
}
if(year%4==0) //is a multiple of 4
{
return true;
}
else
{
return false;
}
}
Explanation:
Output is given as image
Answer:
computers are solve all things in are life
Answer:
Enter a number: 7
Enter a number: 10
Traceback (most recent call last):
File "main.py", line 3, in <module>
print (numi + num2)
NameError: name 'numi' is not defined
Explanation:
The typo in the print statement causes a run-time error, where obviously num1+num2 was expected, and an output of 17.
Answer:
The answer to this question is given below in the explanation section
Explanation:
The correct answer to this question is: it used a more English-like syntax.
The software developer use high-level language to develop or author the program because it is more likely to English syntax and it would be easy for a software developer to author a program easily instead of using low level language and remembering ones and zeros.
Other options are not correct because:
It can be used on computers without microprocessors: Each computer has a microprocessor either you develop a program using high-level or low-level languages. Changes and modifications are easy in high-level language than in low-level languages. so, the option that prevents anyone from making changes to the software later is wrong. However, high-level languages are less complicated in learning and in authoring the programs but it does not use zeros and ones, it uses English-like syntax. So, the last option is also wrong.
Answer:
b. the action is not allowed.
Explanation:
Traffic signs are established rules and regulations designed to direct and guide commuters and other road users.
A red circle and diagonal slash on a sign simply means that the action is not allowed.
A hortatory technique is focused on encouraging, exhorting and urging people to do that which is right, acceptable and worthy of emulation by others.
For example, commuters and road users are being urged not to litter the highway with thrash, waste, or dirt, in order to protect the planet from environmental degradation and pollution. This would help in conserving and mitigating risks posing as a threat to our dear planet and habitat.
Hence, a hortatory technique in policy implementation and enactment is primarily aimed at appealing to the sense and conscience of individuals, to engage in socially responsible acts.