Professional Documents
Culture Documents
Public Class Public Static Void Int Int Double: / Created by Akshay On 11/9/2016.
Public Class Public Static Void Int Int Double: / Created by Akshay On 11/9/2016.
int sub1,sub2,sub3;
int totalmarks=0;
double percentage=0.0;
switch(trump) {
case 0:
case 1:
case 2:
case 3:
System.out.println("The student has failed with" + percentage + "%"
+ "and total marks=" + totalmarks);
break;
case 4:
System.out.println(" D Grade with" + percentage + "%" + "total
marks=" + totalmarks);
break;
case 5:
System.out.println(" C Grade with" + percentage + "%" + "total
marks=" + totalmarks);
break;
case 6:
System.out.println(" B Grade with" + percentage + "%" + "total
marks=" + totalmarks);
break;
case 7:
case 8:
case 9:
System.out.println(" A Grade with" + percentage + "%" + "total
marks=" + totalmarks);
break;
default:
System.out.println("FULL BABY 100/100");
break;
}
/**
* Created by akshay on 11/9/2016.
*/
public class Arithmeticop {
switch(nigga)
{
case 0 :
System.out.println("Add = " + a+b);
break;
case 1 :
System.out.println("Subtract=" + (a-b));
break;
case 2 :
System.out.println("Multiply = " + a*b);
break;
case 3 :
System.out.println("Quotient = " + a/b);
break;
case 4 :
System.out.println("Reminder = " + a%b);
break;
default:
System.out.println("GO DIE");
break;
}
}
/**
* Created by akshay on 11/9/2016.
*/
public class marksifelse {
int sub1,sub2,sub3;
int totalmarks=0;
double percentage=0.0;
/**
* Created by akshay on 11/9/2016.
*/
public class monthname {
switch (monthno) {
case 1:
System.out.println("JAN");
break;
case 2:
System.out.println("FEB");
break;
case 3:
System.out.println("MAR");
break;
case 4:
System.out.println("APR");
break;
case 5:
System.out.println("MAY");
break;
case 6:
System.out.println("JUN");
break;
case 7:
System.out.println("JUL");
break;
case 8:
System.out.println("AUG");
break;
case 9:
System.out.println("SEP");
break;
case 10:
System.out.println("OCT");
break;
case 11:
System.out.println("NOV");
break;
case 12:
System.out.println("DEC");
break;
default:
System.out.println("PLIZ DYE NIGGUS");
break;
}
}
}
/**
* Created by akshay on 11/9/2016.
*/
public class monthdays {
switch (monthno) {
case 1:
System.out.println("JAN has 31 days");
break;
case 2:
System.out.println("FEB has 28 days");
break;
case 3:
System.out.println("MAR has 31 days");
break;
case 4:
System.out.println("APR has 30 days");
break;
case 5:
System.out.println("MAY has 31 days");
break;
case 6:
System.out.println("JUN has 30 days");
break;
case 7:
System.out.println("JUL has 31 days");
break;
case 8:
System.out.println("AUG has 31 days");
break;
case 9:
System.out.println("SEP has 30 days");
break;
case 10:
System.out.println("OCT has 31 days");
break;
case 11:
System.out.println("NOV has 30 days");
break;
case 12:
System.out.println("DEC has 31 days");
break;
default:
System.out.println("PLIZ DYE NIGGUS");
break;
}
}
}
/**
* Created by akshay on 11/9/2016.
*/
public class monthnumber {
if (monthname.equals("JAN")) {
System.out.println("JAN 1");
} else if (monthname.equals("FEB")) {
System.out.println("FEB 2");
} else if (monthname.equals("MAR")) {
System.out.println("MAR 3");
} else if (monthname.equals("APR")) {
System.out.println("APR 4");
} else if (monthname.equals("MAY")) {
System.out.println("MAY 5");
} else if (monthname.equals("JUN")) {
System.out.println("JUN 6");
} else if (monthname.equals("JUL")) {
System.out.println("JUL 7");
} else if (monthname.equals("AUG")) {
System.out.println("AUG 8");
} else if (monthname.equals("SEP")) {
System.out.println("SEP 9");
} else if (monthname.equals("OCT")) {
System.out.println("OCT 10");
} else if (monthname.equals("NOV")) {
System.out.println("NOV 11");
} else if (monthname.equals("DEC")) {
System.out.println("DEC 12");
} else {
System.out.println("PLIZ DYE NIGGUS");
}
}
}
/**
* Created by akshay on 11/9/2016.
*/
public class ternaryop {
int a, b, c, big;
}
}
/**
* Created by akshay on 11/9/2016.
*/
public class Smallestofthreenosif
{
public static void main(String args[])
{
int x, y, z;
System.out.println("Enter three integers ");
Scanner in = new Scanner(System.in);
System.out.println("Enter x");
x = in.nextInt();
System.out.println("Enter y");
y = in.nextInt();
System.out.println("Enter z");
z = in.nextInt();
/**
* Created by akshay on 11/9/2016.
*/
public class series1 {
/**
* Created by akshay on 11/9/2016.
*/
public class Pattern1 {
int n, i, j, k;
Scanner sc = new Scanner(System.in);
System.out.println("How many row you want: ");
n = sc.nextInt();
for (i = 1; i <= n; i++) {
for (k = 0; k <= n - i; k++) {
System.out.print(" ");
}
System.out.print("\n");
}
for(i=1;i<=n-1;i++)
{
for(k=0;k<=i;k++)
{
System.out.print(" ");
}
for(j=n-1;j>=i;j--)
{
System.out.print("*");
}
System.out.print("\n");
}
int i, j, k;
for(i=1;i<=5;i++)
{
for(j=i;j<5;j++)
{
System.out.print(" ");
}
for(k=1;k<(i*2);k++)
{
System.out.print("*");
}
System.out.print("\n");
}
for(i=4;i>=1;i--)
{
for(j=5;j>i;j--)
{
System.out.print(" ");
}
for(k=1;k<(i*2);k++)
{
System.out.print("*");
}
System.out.print("\n");
}
}
/**
* Created by akshay on 11/9/2016.
*/
public class Pattern3 {
char c;
for(int i=1;i<=n;++i)
{
c='A';
for(int j=i;j<n;++j)
{
System.out.print(" ");
}
for(int k=1;k<=i;++k)
{
System.out.print(c);
++c;
}
c-=2;
for(int l=1;l<i;++l)
{
System.out.print(c);
--c;
}
System.out.println();
}
}
/**
* Created by akshay on 11/9/2016.
*/
public class Reverse {
while (n != 0) {
reverse = reverse * 10;
reverse = reverse + n % 10;
n = n / 10;
}
/**
* Created by akshay on 11/9/2016.
*/
public class Primeornot {
int temp;
boolean isPrime = true;
Scanner scan = new Scanner(System.in);
System.out.println("Enter a number for check:");
if (isPrime)
System.out.println(num + " is Prime Number");
else
System.out.println(num + " is not Prime Number");
}
}
/**
* Created by akshay on 11/9/2016.
*/
public class Sumdigit {
int a = 36;
int b = 92;
int big;
int small;
break;
}
} }
/**
* Created by akshay on 11/9/2016.
*/
public class GCD {
while(n2 != 0)
{
r = n1 % n2;
n1 = n2;
n2 = r;
}
System.out.print("GCD = "+n1);
}
}