Answer:validity
Explanation:
Because it dont sound right
Answer:
// program in C++ to check leap year.
// include header
#include<iostream>
using namespace std;
// main function
int main() {
// variable
int inp_year ;
// ask user to enter year
cout<<"Enter year:";
// read year
cin>>inp_year;
// check year is leap or not
if (((inp_year % 4 == 0) && (inp_year % 100 != 0)) || (inp_year % 400 == 0))
// if leap year , print leap year
cout<<inp_year<<" is a leap year.";
else
// print not leap year
cout<<inp_year<<" is not a leap year.";
return 0;
}
Explanation:
Read year from user.Then check if year is divisible by 4 and not divisible by 100 or year is divisible by 400 then year is leap year.otherwise year is not leap year.
Output:
Enter year:1712
1712 is a leap year.
Answer:
Following are the program in the Python Programming Language.
#set list type variable and initialize the elements
myPizza = ['Margarita', 'Capsicum and onion', 'Chicken']
#set variable and initialize the elements
frndPizzas = myPizza[:]
#append value in list variable
myPizza.append('Corn')
#append value in list variable
frndPizzas.append('paperica')
#print message
print("My pizzas are:")
#set the for loop and print elements of 1st list
for pizza in myPizza:
print(pizza)
#print message
print("\nFriend's pizzas are:")
#set the for loop and print elements of 2st list
for frndsPizza in frndPizzas:
print(frndsPizza)
<u>Output</u>:
My pizzas are:
Margarita
Capsicum and onion
Chicken Corn
Friend's pizzas are:
Margarita Capsicum and onion Chicken paperica
Explanation:
<u>Following are the description of the program</u>:
- Set a list data type variable that is 'myPizza' and initializes elements in it.
- Set another list data type variable that is 'frndPizzas' and initializes elements in it.
- Append one-one element in both of the list data type variables.
- Set the for loops to print the elements of both list data type variables.