ISC Computer Project JAVA

Embed Size (px)

DESCRIPTION

This is a project for computer science for ISC

Citation preview

Coding

import java.util.Scanner;class base{int x; int a; int sum=0; int y, sum1;int n, max;String p="", q="", x1, y1;int j=0; int pp=0, k;int r=0;void input(){Scanner sc=new Scanner(System.in);System.out.print("X = ");x1=sc.nextLine();check(x1, x);x=r;p+=x;System.out.print("Y = ");r=0;y1=sc.nextLine();check(y1, y);y=r;System.out.println("x = "+x+" y = "+y);q+=y;}void check(String chek, int ceh){if((chek).equals("a")||(chek).equals("A")){r=10;}else if((chek).equals("f")||(chek).equals("F")){r=15;}else if((chek).equals("b")||(chek).equals("B")){r=11;}else if((chek).equals("c")||(chek).equals("C")){r=12;}else if((chek).equals("d")||(chek).equals("D")){r=13;}else if((chek).equals("e")||(chek).equals("E")){r=14;}elser=Integer.parseInt(chek);

}void base1(){a=x+1;int k=p.length()-1;pp=0;int aa=p.length()-1;for(j=2; j