The programmer solves the problems of a user by expressing an algorithm in a programming language to make a program that can run on a computer.
Hey!
I believe the answer to 1. Should be A. Rule of Thirds.
Answer:
Step 1 : Create an Indicator Variable for metro cities using formula mentioned in formula bar.
Step 2: Filter the Data on Metro cities i.e. select only those cities with Metro Indicator 1.
Step 3: Paste this filtered data to a new sheet.
Step 4: Go to Data - Data Analysis - Regression
Step 5: Enter the range of Y-variable and X-variable as shown. Select Output range and click on residuals. It will give you Output Summary and the Predicted Values along with Residuals
Please see attachment
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.
A computer.
Core components of a computer
Processor (cpu): can compute instructions
RAM (random access memory): Holds running processes.
HDD( hard disk drive): Stores data, e.g. pictures, documents, games etc.
Motherboard: Allows devices to communicate with each other via a "bus".
Power Supply (PSU): converts AC current to DC, providing the computer with power.