Answer:
The code to this question can be given as:
code:
for(i=1;i<=n;i++) //for loop column
{
for(j=1;j<=i;j++) //for loop for rows
{
printf("*"); // print asterisks
}
printf("\n"); //line break
}
Explanation:
We know that variable i,j, and n is already declared and n variable has initialized a value. So, we write the code that is given above. In this code, we use a nested loop. In this code, we use two loops that are a loop (i)for column and j loop for rows. for print asterisks triangle we use two for loop. For that, we use two-variable (i,j) that is already declared. We assign the value in (i) loop that is 0 and checks that (i) is less than equal to n and increment of (i) by 1. In this loop, we use another loop that is (j) loop. It also starts from 1 and checks that (j) is less than equal to (i)and increment of (j) by 1. In that loop, we print asterisks end of (j) loop. In (i) loop we use ("\n") for line break end of (i) loop.
A tasks are suitable for creating an algorithm are:
- giving directions to a location.
- solving a math problem.
- tracking money in a bank account.
- tracking the number of items in inventory.
<h3>What is algorithm?</h3>
An algorithm is known to be a form of a procedure that is often employed in the act of solving a problem or carrying out a computation.
Note that in the case above, A tasks are suitable for creating an algorithm are:
- giving directions to a location.
- solving a math problem.
- tracking money in a bank account.
- tracking the number of items in inventory.
See options below
giving directions to a location
saving time writing a computer program
solving a math problem
tracking money in a bank account
tracking the number of items in inventory
Learn more about algorithm from
brainly.com/question/24953880
#SPJ1
Answer:
HTML Link Colors
By default, a link will appear like this (in all browsers):
An unvisited link is underlined and blue
A visited link is underlined and purple
An active link is underlined and red
You can change the link state colors, by using CSS:
Answer:
The correct answer for the given question is " The Code fragment A runs fastly than the code fragment of B".
Explanation:
In this question there are some information is missing i. e options. The question does not give any options. The options for the given question is given below
(A.) The Code fragment A runs fastly than the code fragment of B.
(B.) The Code fragment B runs fastly than code fragment of A.
(C) The Code fragment A runs as fastly as code fragment of B.
So we conclude the answer i.e option(A) because As given in the question list1 is a MyArrayList and list2 is a MyLinkedList. , in list1 we fetching the data easily and fastly means that it remove the data easily as compare to list2 As MyArrayList is storing the list only and also we can fetch the data easily manner.
The list2 is an object of MyLinkedList means that it manipulating the data fastly as compared to MyArrayList but if we compared the fetching of data then MyArrayList is a better option so the code fragment runs fastly then code fragmented B.