Answer:
// here is code in c.
#include <stdio.h>
// main function
int main()
{
// variable to store year
int year;
printf("enter year:");
// read the year
scanf("%d",&year);
// if year>=2101
if(year>=2101)
{
printf("Distant future");
}
//if year in 2001-2100
else if(year>=2001&&year<=2100)
{
printf("21st century");
}
//if year in 19011-2000
else if(year>=1901&&year<=2000)
{
printf("20th century");
}
// if year<=1900
else if(year<=1900)
{
printf("Long ago");
}
return 0;
}
Explanation:
Read the year from user.After this, check if year is greater or equal to 2101 then print "Distant future".If year is in between 2001-2100 then print "21st century".If year is in between 1901-2000 then print "20th century".Else if year is less or equal to 1900 then print "Long ago".
Output:
enter year:2018
21st century
Answer:
I am writing a Python program:
def Eratosthenes(n):
primeNo = [True for i in range(n+1)] # this is a boolean array
p = 2 # the first prime number is initialized as 2
while (p * p <= n): # enumerates all multiples of p
if (primeNo[p] == True):
for i in range(p * p, n+1, p): #update multiples
primeNo[i] = False
p = p + 1
for p in range(2, n): #display all the prime numbers
if primeNo[p]:
print(p),
def main(): #to take value of n from user and display prime numbers #less than or equal to n by calling Eratosthenes method
n= int(input("Enter an integer n: "))
print("The prime numbers less than or equal to",n, "are: ")
Eratosthenes(n)
main()
Explanation:
The program contains a Boolean type array primeNo that is initialized by True which means that any value i in prime array will be true if i is a prime otherwise it will be false. The while loop keeps enumerating all multiples of p starting from 2, and striking them off from the original array list and for loops keep updating the multiples. This process will continue till the p is greater than n. The last for loop displays all the prime numbers less than or equal to n which is input by user. main() function prompts user to enter the value of integer n and then calls Eratosthenes() function to print all the prime numbers less than or equal to a given integer n.
Answer:
An indirect tax in the form of sales tax
Explanation:
This is certainly the sales tax, and that the shoe retailer is charging with the actual price And each retailer must charge this as they have to submit the sales tax on the number of goods they sell in a year. And these are indirect taxes. Hence, the $45s here is the price of the shoe, and the extra $3s is the sales tax on that shoe. The retailer collects this on behalf of the government, and remember this is an indirect tax.
Answer:
Microsoft Excel
Explanation:
Microsoft Excel is a Microsoft application package. It is a spreadsheet application used to analyse and manipulate data. It has columns which are referred to fields and rows also known as records.There are various features in excel that used to create statistical and graphical esctasies and data presentations.
It can be used to create template for CVs/resumes, Bank draft, receipts and invoice etc.