public class JavaApplication71 {
public static void main(String[] args) {
for (int i = 1; i <= 20; i++){
for(int w = 0; w < i; w++){
System.out.print(i+" ");
}
System.out.println("");
}
}
}
I hope this helps!
Answer:
Step 1 : Construct the table under three conditions possible and with two possible results. A total of 8 possible rules should be provided for the three different conditions, and the table should look like the following example : attached is the discount table
Step 2 : Now the rules can be simplified, by considering the following :
a) If a consumer filled survey form AND signs up for newsletter, as in Rules 1and2, they are eligible to receive a discount when their order exceeds $100. Twoseparate rules are therefore included and the third condition (order quantity) is relevant.
b) If the customer finalizes the survey form OR signed up for the newsletter, as provided for in Laws 3, 4, 5 and 6, he or she will receive free shipments, but the purchase quantity does not matter. Therefore, such situations may be known as two separate rules where one requirement is fulfilled, but not the other.
c) If a client does not fulfill any of the requirements, as in Rules 7 and 8, the order amount shall not be applied to him or her for either free shipping or discount. It can be interpreted as one law. The simplification table is linked to this.
Answer:
b
Explanation:
It is not "import sqrt" because import is used to add a module, and "sqrt" is not a module.
It is not sqrt(16) because we need to use the math. prefix so that python recognizes that sqrt is a function from the math module.
Answer:
Follows are the code to this question:
#include <iostream>//defining a header file
using namespace std;
int roll()//defining a method roll
{
return 1+(rand() %5);//use return keyword that uses a rand method
}
int main()//defining main method
{
cout<<roll();//calling roll method that print is value
return 0;
}
Output:
4
Explanation:
In this code, the "roll" method is defined, that uses the rand method with the return keyword, that returns the value between 1 to 6, and in the next step, the main method is declared, that uses the print method to calls the roll method.
Answer:
tom wants to help her
Explanation:
Tom is rushing because he is at the top of a department store and he can't get a hold of her.