Computer Science, asked by VANSHIKAPARTH, 2 months ago

Write a program that asks for a number(say a) and then print a^1,a^2,a^3,a^4, a^5
PLS ANSWER ITS URGENT.......

Answers

Answered by purvanshsharma6
2

Answer:

import java.util.*;

class brain                    //use public infront of class if using an online compiler

{

public static void main(String args[]){

Scanner sc = new Scanner(System.in);

System.out.println("Enter any no :");

int n = sc.nextInt();

for(int i = 1; i<=5; i++){

System.out.print(n + "^" + i + ",");

{

{

{

Answered by jejibi
12

Explanation:

hey good morning guys

please follow me

I will give thanks to ur answers

follow= ❤️❤️ thanks

Similar questions