Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class factorial {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner lee = new java.util.Scanner (System.in);
- int suma = 1;
- int ascii1;
- short n = lee.nextShort();
- for(int i=n;i>1;i--){
- suma=suma*i;
- }
- String str1=Integer.toString(suma);
- str1.length();
- String substring1 = str1.substring(0,2);
- String substring2= str1.substring(2,4);
- int num1=Integer.parseInt(substring1);
- int num2=Integer.parseInt(substring2);
- System.out.print((char)num1);
- System.out.print((char)num2);
- System.out.println();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement