Contents
 1 How do you print a triangle?
 2 How do you make a triangle in a loop?
 3 How do you draw a triangle in Java with an applet?
 4 How do you make a pyramid of numbers in Java?
 5 Is the triangle a program?
 6 How do you print Pascal triangle?
 7 What is Floyd’s triangle in Java?
 8 How do you make a for loop triangle in C++?
 9 What loop means?
 10 What is function overloading in Java?
 11 How do you create a shape in an applet?
 12 How do I run an applet program?
 13 How do you code a pattern in Java?
 14 How do you code a multiplication table in Java?
 15 How do you reverse a number in Java?
How do you print a triangle?
C Program to print Number Triangle
 #include<stdio.h>
 #include<stdlib.h>
 int main(){
 int i,j,k,l,n;
 system(“cls”);
 printf(“enter the range=”);
 scanf(“%d”,&n);
 for(i=1;i<=n;i++)
How do you make a triangle in a loop?
We can extract the StringUtils. repeat() methods above to build a helper string and then apply the String. substring() method on it. The helper string is a concatenation of the maximum number of spaces and the maximum number of stars that we need to print the rows of the triangle.
How do you draw a triangle in Java with an applet?
PROGRAM
 applet. Applet;
 Color;
 awt. Graphics;
 public class CircleInsideTriangle extends Applet {
 public void paint(Graphics g) {
 // Draws a triangle.
 int xPoints[] = {120, 220, 30};
 int yPoints[] = {30, 220, 220};
How do you make a pyramid of numbers in Java?
java program to create pyramid of numbers
 util. Scanner;
 public class MainClass {
 public static void main(String[] args) {
 Scanner sc = new Scanner(System. in);
 //Taking noOfRows value from the user.
 println(“How Many Rows You Want In Your Pyramid?”
 int noOfRows = sc. nextInt();
 //Initializing rowCount with 1.
Is the triangle a program?
A triangle is a valid triangle, If and only If, the sum of any two sides of a triangle is greater than the third side. For Example, let A, B and C are three sides of a triangle. Then, A + B > C, B + C > A and C + A > B.
How do you print Pascal triangle?
Program to print pascal’s triangle
 // C program to print pascal’s triangle.

 #include.
 int main()
 {
 int rows, coef = 1, space, i, j;
 printf(“nEnter the number of rows: “);
 scanf(“%d”,&rows);
What is Floyd’s triangle in Java?
The code for printing Floyd’s triangle is the method printFloydTriangle(int rows), it takes number of rows, which is the user input. This method uses nested loops, two loop in this case to draw format of Floyd’s triangle. First loop is used to print number of rows and second loop is used to print numbers in the row.
How do you make a for loop triangle in C++?
C++ Program to print Number Triangle
 #include <iostream>
 using namespace std;
 int main()
 {
 int i,j,k,l,n;
 cout<<“Enter the Range=”;
 cin>>n;
 for(i=1;i<=n;i++)
What loop means?
In computer science, a loop is a programming structure that repeats a sequence of instructions until a specific condition is met. Programmers use loops to cycle through values, add sums of numbers, repeat functions, and many other things. Two of the most common types of loops are the while loop and the for loop.
What is function overloading in Java?
In Java, two or more methods may have the same name if they differ in parameters (different number of parameters, different types of parameters, or both). These methods are called overloaded methods and this feature is called method overloading. These methods have the same name but accept different arguments.
How do you create a shape in an applet?
In this article we will draw a ellipse on Java applet by two ways. By using the drawOval(int x, int y, int width, int height) or by using mathematical formula (X= A * sin a, Y= B *cos a, where A and B are major and minor axes and a is the angle ). Similarly, we will draw a rectangle on Java applet by two ways.
How do I run an applet program?
There are two standard ways in which you can run an applet:
 Executing the applet within a Javacompatible web browser.
 Using an applet viewer, such as the standard tool, applet viewer. An applet viewer executes your applet in a window. This is generally the fastest and easiest way to test your applet.
How do you code a pattern in Java?
11. Sandglass Star Pattern
 import java.util.Scanner;
 public class SandglassPattern.
 {
 public static void main(String[] args)
 {
 int i, j, k, n;
 Scanner sc = new Scanner(System.in);
 System.out.print(“Enter the number of rows you want to print: “);
How do you code a multiplication table in Java?
Java Program to Print Multiplication Table for any Number
 public class Multiplication_Table.
 Scanner s = new Scanner(System.
 System. out. print(“Enter number:”);
 int n=s. nextInt();
 for(int i=1; i <= 10; i++)
 System. out. println(n+” * “+i+” = “+n*i);
How do you reverse a number in Java?
Example 1: Reverse a Number using a while loop in Java
 First, the remainder of the num divided by 10 is stored in the variable digit.
 After second iteration, digit equals 3, reversed equals 4 * 10 + 3 = 43 and num = 12.
 After third iteration, digit equals 2, reversed equals 43 * 10 + 2 = 432 and num = 1.