ºÝºÝߣ
Submit Search
Some logics
?
Download as TXT, PDF
?
0 likes
?
132 views
santwana 3
Follow
1 of 1
Download now
Download to read offline
More Related Content
Some logics
1.
copy=num;sum=0 while(copy!=0) { remainder=copy%10; sum=sum+remainder*remainder*remainder; copy=copy/10; } if (sum==num)-->armstrong else
not armstrong -------------------------------------------------------------------------------- ----------- rev a num copy=num;rev num=0; for(copy2=num; copy2>0;copy2/10) { remainder= copy2%10; rev num=remainder+rev num*10; } -------------------------------------------------------------------------------- ----------- int num,fact=1; for(int count=num;count>0;count--) { fact= count*fact; } =------------------------------------------------------------------------------- ----------- int num,check; for(int i=2;i<num;i++) { check=num%i; if(check==0) System.out.println("not prime"); } System.out.println("prime"); -------------------------------------------------------------------------------- ----------- int num, for(int i=0;
Download