i need help for this guys
Attachments:
Answers
Answered by
0
Answer:
if you mark me as brainiest I answered you tomorrow sure
Explanation:
I have to answer later because tomorrow is my science exam
Answered by
0
Answer:
class Armstrong
{
public static void main()
{
Scanner sc=new Scanner(System.in);
int n,d,copy=0;
double s=0.0;
System.out.println("Enter a no.");
n=sc.nextInt();
copy=n;
while(n>0)
{
d=n%10;
s=s+Maths.pow(d,3);
n=n/10;
}
if(s==copy)
System.out.println(copy+"is Armstrong");
else
System.out.println(copy+"is not armstrong");
}
}
//plz mark me as brainliest and any other this kind of programs if are troubling u ,u can ask me
Similar questions
Science,
4 months ago
India Languages,
4 months ago
Math,
4 months ago
Math,
9 months ago
Math,
9 months ago
Computer Science,
1 year ago