can anyone help me with these 2 questions? #1.Create a program named PyramidPrin
ID: 3856178 • Letter: C
Question
can anyone help me with these 2 questions?
#1.Create a program named PyramidPrinter. Use the command prompt window for output. You must use nested for loops for this program. Hint: the values are all powers of 2. You may look ahead to the Math class pow method. The pyramid must look like this:
#2.Create a program MultiplicationTable that displays a multiplication table. You must use nested for loops for this program. Your numbers must be displayed in right-aligned columns. Use the command prompt window (terminal) for output.
Sample output:
For question#2, for some reasons i cant make the title exactly the same as the example, always off a little bit.
It would be nice if you can show me the correct examples for both questions
Explanation / Answer
import java.util.Scanner; public class Multiplication_Table { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.print("Enter number:"); int n=s.nextInt(); for(int i=1; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.