Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

CPP AND JAVA PROGS ADDED

  • Loading branch information...
ishsum committed Oct 12, 2018
1 parent 93464f8 commit 08624ae702247325afb77d25d59db62ae3649893
Showing with 2,456 additions and 61 deletions.
  1. +0 −6 Cpp/Hello World in C++
  2. +0 −8 Cpp/Hello and
  3. +0 −20 Cpp/PrimeOrNot.cpp
  4. +0 −14 Cpp/gcd.cpp
  5. +0 −6 Cpp/jhhelloworld.cpp
  6. +0 −7 Cpp/print.cpp
  7. +1 −0 cpp/hello-world
  8. +1 −0 cpp/hello-world---linked-lists
  9. +1 −0 cpp/hello-world---sorting-algorithms
  10. +1 −0 cpp/hello-world---trees
  11. +58 −0 java998/Array.java
  12. +33 −0 java998/Check.java
  13. +26 −0 java998/File.java
  14. +8 −0 java998/First.java
  15. +41 −0 java998/Grade.java
  16. +28 −0 java998/Leap.java
  17. +62 −0 java998/MAin3.java
  18. +52 −0 java998/Main1.java
  19. +63 −0 java998/Main33.java
  20. +64 −0 java998/Main4.java
  21. +56 −0 java998/Main5.java
  22. +29 −0 java998/One.java
  23. +66 −0 java998/Player1.class.txt
  24. +72 −0 java998/Player1.java
  25. +44 −0 java998/Poly.java
  26. +24 −0 java998/Ques1.java
  27. +28 −0 java998/Ques2.java
  28. +23 −0 java998/Ques3.java
  29. +39 −0 java998/Reverse.java
  30. +22 −0 java998/Scan.java
  31. +11 −0 java998/Second.java
  32. +18 −0 java998/String.java
  33. +66 −0 java998/Student.java
  34. +81 −0 java998/Switch.java
  35. 0 java998/Test.java
  36. +81 −0 java998/Test1.java
  37. +77 −0 java998/Testclass.java
  38. +69 −0 java998/ass3 ques fever.txt
  39. +45 −0 java998/countprimes.txt
  40. +667 −0 java998/dbms.txt
  41. +43 −0 java998/ispalidrome.txt
  42. +11 −0 java998/kamal.java
  43. +78 −0 java998/most frequent.txt
  44. +45 −0 java998/nth prime.txt
  45. +28 −0 java998/prime.java
  46. +63 −0 java998/stat.txt
  47. +63 −0 java998/state.java
  48. +63 −0 java998/statik.java
  49. +56 −0 java998/uniquedigitcount.txt
  50. +49 −0 java998/weight.txt

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Submodule hello-world added at a3f080
Submodule hello-world---linked-lists added at 6077cc
Submodule hello-world---sorting-algorithms added at 27fd01
Submodule hello-world---trees added at 6db1ee
@@ -0,0 +1,58 @@
import java.util.Scanner;
class Array
{

public static void main(String arg[])
{
Scanner sc=new Scanner(System.in);
int arr[]=new int[5];

for(int i=0;i<5;i++)
{

int f=sc.nextInt();
arr[i]=f;

}

for(int i=0;i<5;i++)
{

System.out.println(arr[i]);
}

System.out.println("\n");

int b[][]=new int[2][2];


for(int i=0;i<2;i++)
{
for(int j=0;j<2;j++)
{
int r=sc.nextInt();
b[i][j]=r;

}
}

for(int i=0;i<2;i++)
{
for(int j=0;j<2;j++)
{

System.out.print(b[i][j]+" ");

}
System.out.print("\n");

}






}

}
@@ -0,0 +1,33 @@

import java.io.*;
import java.util.*;


class Check
{

public static void main(String arg[]) {


int arr[]=new int[4];

arr[0]=2;
arr[1]=2;
arr[2]=1;
arr[3]=8;




int sum=0;

for(int i=3;i>=0;i--)
{

sum=sum+arr[i]*10^i;
}

System.out.println(sum);
}

}
@@ -0,0 +1,26 @@


class A
{
public static void main(String arg[])
{
System.out.println("Class A");
}
}

class B
{
void display()
{System.out.println("HELOO B");
}
}

class C
{

void display()
{System.out.println("c class");
System.out.println("HELOO C");
}
}

@@ -0,0 +1,8 @@
class first
{

public static void main(String arg[])
{
System.out.prxintln("hello java");
}
};
@@ -0,0 +1,41 @@
import java.util.Scanner;

class Grade
{
public static void main(String arg[])
{
Scanner s=new Scanner(System.in);
int a=s.nextInt();

if(a<50)

{
System.out.println("FAIL");

}

else if(a>=50 && a<60)
{
System.out.println("D");
}
else if(a>=60 && a<70)
{
System.out.println("c");
}
else if(a>=70 && a<80)
{
System.out.println("B");
}
else if(a>=80 && a<90)
{
System.out.println("A");
}

else
{
System.out.println("O");
}
}


};
@@ -0,0 +1,28 @@
import java.util.Scanner;

class Prime
{
public static void main(String str[])
{
Scanner S=new Scanner(System.in);
int a=S.nextInt();
int flag=0;
for(int i=2;i<=a-1;i++)
{
if(a%i==0)
{
System.out.println("NOT PRIME");
flag=1;
}


}
if(flag==0)
{
System.out.println("PRIME");
}

}


};
@@ -0,0 +1,62 @@
import java.util.Scanner;
class Player3
{
private String name;
private int age;
private String country;
public Player3()
{
age=0;
name=" ";
country=" ";

}

public Player3(String name,int age,String country)
{
this.name=name;
this.age=age;
this.country=country;

}

public void display()
{

System.out.println("Player Details: ");

System.out.println("Name: "+name);

System.out.println("Age: "+age);

System.out.println("Country: "+country);


}


}


class Main3
{
public static void main(String arg[])
{

Scanner sc=new Scanner(System.in);
System.out.println("Enter name:");
String name=sc.nextLine();
System.out.println("Enter Age:");
int age=sc.nextInt();

System.out.println("Enter country:");
sc.nextInt();
String country=sc.nextLine();
Player3 obj=new Player3(name,age,country);
obj.display();


}


}
@@ -0,0 +1,52 @@
import java.util.Scanner;

class Player
{
String name;
int age;
String country;

void setName(String n)
{
name=n;
}
void setAge(int r)
{
age=r;
}
void setCountry(String c)
{
country=c;
}

void display()
{
System.out.println("Player Details:");
System.out.println("Name is "+name);
System.out.println("Age is "+age);
System.out.println("Country is "+country);

}

}
class Main1
{
public static void main(String arg[])
{

Player p=new Player();
Scanner s=new Scanner(System.in);
System.out.println("Enter Name:");
String n=s.nextLine();
p.setName(n);
System.out.println("Enter Age:");
int r=s.nextInt();
p.setAge(r);
System.out.println("Enter Country:");
s.nextLine();
String c=s.nextLine();
p.setCountry(c);
p.display();
}

}

0 comments on commit 08624ae

Please sign in to comment.
You can’t perform that action at this time.