import java.io.*;
public class Arms
{
public static void main(String args[]) throws Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the number to be printed: ");
int n=Integer.parseInt(br.readLine());
int num,sum,r,temp;
System.out.println("Armstrong numbers upto given limit are:\n");
for(num=1;num<n;num++)
{
temp=num;
sum =0;
while (temp!=0)
{
r=temp%10;
sum=sum+(r*r*r);
temp=temp/10;
}
if(sum==num)
{
System.out.println(num);
}
}
}
}
Regards
Ramakrishna Nallapati
/*Program to find whether given no. is Armstrong or not. Example : Input - 153 Output - 1^3 + 5^3 + 3^3 = 153, so it is Armstrong no. */ class Armstrong{ public static void main(String args[]){ int num = Integer.parseInt(args[0]); int n = num; //use to check at last time int check=0,remainder; while(num > 0){ remainder = num % 10; check = check + (int)Math.pow(remainder,3); num = num / 10; } if(check == n) System.out.println(n+" is an Armstrong Number"); else System.out.println(n+" is not a Armstrong Number"); } }
import java.io.*; public class Jerry { public static void main(String as[]) throws IOException { int k=Integer.parseInt(as[0]); int n=k; int d=0,s=0; while(n>0) { d=n%10; s=s+(d*d*d); n=n/10; } if(k==s) System.out.println("Armstrong number"); else System.out.println("not Armstrong number"); } }
Get some resistors of known values and check your meter with them.
Range Check
Accept 3 natural numbers and check whether it firms pythagorean triplet
/*Program to find whether given no. is Armstrong or not. Example : Input - 153 Output - 1^3 + 5^3 + 3^3 = 153, so it is Armstrong no. */ class Armstrong{ public static void main(String args[]){ int num = Integer.parseInt(args[0]); int n = num; //use to check at last time int check=0,remainder; while(num > 0){ remainder = num % 10; check = check + (int)Math.pow(remainder,3); num = num / 10; } if(check == n) System.out.println(n+" is an Armstrong Number"); else System.out.println(n+" is not a Armstrong Number"); } }
import java.io.*; public class Jerry { public static void main(String as[]) throws IOException { int k=Integer.parseInt(as[0]); int n=k; int d=0,s=0; while(n>0) { d=n%10; s=s+(d*d*d); n=n/10; } if(k==s) System.out.println("Armstrong number"); else System.out.println("not Armstrong number"); } }
write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html
-12.5 and 13.5 Check: -12.5*13.5 = -168.75 and -12.5+13.5 = 1
<html> <head> <Script Language="JavaScript"> var a,n,b=0,t; n=parseInt(window.prompt("enter n","0")); t=n; while(n>0) { a=n%10; b=b+a*a*a; n=n/10; } if(b==t) { document.writeln("Armstrong no"); } else { document.writeln("Not an Armstrong no"); } </script> </head> </html>
You will have to call Colt for anything after @ 2003. Check Blue Book of Gun values.
i think he is 36. check wikipedia.
That depends on the specific make and model of your fax machine. Check your user's manual, or look on the manufacturer's website.
program would you run to check for possible disk errors
what are the numbers at the bottom of a check called
i need a completly free vin check program
not sure of the exact syntax but its quite hard to generate them, but you can go through a list of numbers, that could be 0-10000000 say, and check if it is prime by dividing it by all the numbers that are smaller than it