Answer:
Following are the program to this question:
#include <iostream>//defining header file
using namespace std;
void squareOfAsterisks(int x) //defining method squareOfAsterisks
{
int i,j; //defining integer variable
for(i=1;i<=x;i++) //defining loop to print column value
{
for(j=1;j<=x;j++) //defining loop to print row value
{
cout<<"*"; //print value
}
cout<<endl; //for line break
}
}
int main() //defining main method
{
int x; //defining integer variable
cout<<"Enter any number: "; //print message
cin>>x; //input value from user
squareOfAsterisks(x); //calling the method and pass the value
return 0;
}
Output:
Enter any number: 4
****
****
****
****
Explanation:
The description of the above program can be given as follows:
- In the given program a method "squareOfAsterisks" is declared, that accepts an integer value "x" in its arguments, inside the method two integer variable I, j is used, that uses a to print the given pattern.
- In the main method, an integer variable x is declared, which takes input from the user end, and then calls the method, that is "squareOfAsterisks" and passes its value.
Answer:
1. x - 6
2. p - ? = 7
i chose these equations because
a number - 6 = the weight of your backpack.
p - an unknown number without a substitute variable = slices of bread left.
Answer:
The python function is as follows:
def fact(N):
factorial = 1
for i in range(1,N+1):
factorial = factorial * i
return(factorial)
Explanation:
This line defines the function
def fact(N):
This line initializes the product of 1 to N to 1
factorial = 1
This line iterates through 1 to N
for i in range(1,N+1):
This line calculates the product of 1 to N i.e. factorial
factorial = factorial * i
This line returns the factorial
return(factorial)
Answer:
Sally sells sea shells by the sea shore
Explanation:
Answer:
Possible consequences for cyber bullying include depression, isolation and illness
Explanation:
The reason for this is when a person is hurt there body tends to go through things to make them feel a certain way about things.