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.
I would say A because the SETI Institute said, "Philip Morrison and Guiseppe Cocconi analyzed how two civilizations separated by many light years of space might use electromagnetic radiation to communicate.
Electromagnetic radiation is the general term for the more familiar light and radio waves."
So there you go!
Answer:
Answer is (value MOD 5) = 0.
Explanation:
A number A is multiple of another number B if after dividing A by B remainder value is zero.
In mathematics modulo or (MOD) function is a function which returns remainder value after dividing two numbers.
Here in question for condition
( value MOD 5 ) = 0 code will print "Multiple of 5". For each value which is divisible by 5 we will get zero remainder implying that value is a multiple of 5.
Designers use both isometric and perspective sketches to
maintain an object’s visual proportions. Isometric sketches are 3D objects
drawn with lines that have no vanishing points while perspective sketches are 3D
objects drawn with one or more vanishing points.
Designers choose to use an
isometric sketch because it is more accurate than perspective drawings and
makes the design look more professional. Isometric sketches are much easier to
handle because the length of each measure is same as the plan. This is especially
for designers drawing pictures by hand. It is time saving and you do not need
to calculate the angle of every edge.
Answer:
import java.awt.Point;
public class Line{
private Point point1, point2;
public Line(Point p1, Point p2){
point1 = p1;
point2 = p2;
}
public Point getP1(){
return point1;
}
public Point getP2(){
return point2;
}
public String toString(){
return "[( The " + point1.x + "," + point1.y + "), (" + point2.x + "," + point2.y +")]";
}
public static void main(String args[]){
Line lineObj = new Line(new Point(7,9), new Point(6,2));
System.out.println(lineObj.toString());
}
}
Explanation:
- Declare the points inside the class Line.
- Initialize the getters and setters method for the class.
- Define a toString method that returns the information in a formatted manner.
- Inside the main method, initialize an object with some values.
- Display the information by calling the toString method.