Answer: D
Explanation:
It is not A or C because the "d" in "Divide" is capitalized and the d is lowercase in calling the function. Therefore the answer is D (the last choice) because numA / numB (30 / 5) equals 6.
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
The answer would be (DOCSIS). :)
Have a blessed day and hope this helps!
Answer:
The correct answer to the following question will be "Application program".
Explanation:
- Applications include database programs, word processors, browsers, development tools, picture editors, and platforms for communication.
- It use the OS (Operating System) of the computer and many other assisting programs, frequently system software, to work.
- An application program is a detailed, body-contained program that directly works a given function for just the user.
There are some examples of application programs such as:
- Includes various bundled software.
- Addresses an organization's data management and application requirements, covering all divisions.
- It allows users can create and manage information.
- Used primarily to get content access without editing.
Answer:
function sum(number) {
if (number == 1) {
return 1;
}
return number + sum(number -1);
}
Explanation:
This is a recursive function, it means that is a function that calls itself for example: if you call the function with sum(5) the process is :
sum(5)
|______ 5 + sum(4)
|_______ 4 + sum(3)
|______ 3 + sum(2)
|_____2 + sum(1)
|_____ 1
the result is 1+2+3+4+5 = 15