Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main() {
//variable to store input
double price;
int totalNumber;
// variable to store total price
double total_price;
cout<<"Enter the price of an order:";
// read the price of an order
cin>>price;
cout<<"Enter the number of orders:";
// read the total number of orders
cin>>totalNumber;
// calculate total price of all orders
total_price=price*totalNumber;
cout<<"total price of all orders: "<<total_price<<endl;
return 0;
}
Explanation:
Declare three variables "price" of double type,"totalNumber" of int type And "total_price" of type double.Read the value of an order and number of orders. The calculate the total price by multiply "price" with "totalNumber" and assign it to variable "total_price". Print the total price.
Output:
Enter the price of an order:12.5
Enter the number of orders:3
total price of all orders: 37.5
Answer:
1
Explanation:
Anything to the 0th power is 1. However, 0⁰ is undefined.
Answer:
year = int(input("Enter a year: "))
if (year % 4) == 0:
if (year % 100) == 0:
if (year % 400) == 0:
print(str(year) + " - leap year")
else:
print(str(year) +" - not a leap year")
else:
print(str(year) + " - leap year")
else:
print(str(year) + "- not a leap year")
Explanation:
*The code is in Python.
Ask the user to enter a year
Check if the <u>year mod 4</u> is 0 or not. If it is not 0, then the year is not a leap year. If it is 0 and if the <u>year mod 100</u> is not 0, then the year is a leap year. If the <u>year mod 100</u> is 0, also check if the <u>year mod 400</u> is 0 or not. If it is 0, then the year is a leap year. Otherwise, the year is not a leap year.
Answer:
This address is by default a class c network
Explanation:
This IP address in this question is a class c network because it has 196 as its first octet. A class c network is one which has its first octet to be between 192 and 223. the class c network begins with a 110 binary. If ip is between 192 to 223 it belongs to this class. These first 3 octets are the representation of the network number in the address. Class c's were made to support small networks initially.
BLM movement and protests,
The election, school shootings, and the pandemic