Skip to content

Issue 2.19 solved #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions samueledward/Question 2.0/Circle.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package classes;

/**
*
* @author Samuel Edward
*/

import java.util.Scanner;

public class Circle {
public static void main (String args[]) {
// Declaration of varriable
int radius, diameter;
double circumfrence, area;
double PI = 3.14159;

// Getting varriable from the user
Scanner sc = new Scanner(System.in);
System.out.println("Enter the radius of a Circle: ");
radius = sc.nextInt();

//Output Assignment
diameter = 2 * radius;
circumfrence = PI * radius * 2;
area = PI * radius * radius;

//Printing all the requiered variable to the console
System.out.println("The value for the diameter : " + diameter);
System.out.println("The value for the circumfrence: " + circumfrence);
System.out.println("The value for the area : " + area);





}

}
45 changes: 45 additions & 0 deletions samueledward/Question 2.0/Square_and_Cubes.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//Compute the square and cubes
package classes;

/**
*
* @author Samuel Edward
*/
public class Square_and_Cubes {
public static void main (String args []) {

//Block for displaying the numbers itself
System.out.print("The numbers are : ");
for(int i =1; i<=10; i++){
System.out.print( i);
if (i < 10) {
System.out.print(",");
}else {
System.out.println(".");
}
}
//Block for displaying the square of those numbers
System.out.print("The numbers for the square are : ");
for(int i =1; i<=10; i++){
System.out.print( i*i);
if (i < 10) {
System.out.print(",");
}else {
System.out.println(".");
}
}

//Block for displaying the cube of those numbers
System.out.print("The numbers for the cube are : ");
for(int i =1; i<=10; i++){
System.out.print( i*i*i);
if (i < 10) {
System.out.print(",");
}else {
System.out.print(".");
}
}


}
}
21 changes: 21 additions & 0 deletions samueledward/Question 2.0/TOD.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

package classes;

/**
*
* @author Samuel Edward
*/
public class TOD {
public static void main (String args []) {

//Printing TOD
System.out.println(" *********** * *");
System.out.println(" * * * * *");
System.out.println(" * * * * *");
System.out.println(" * * * * *");
System.out.println(" * * * * *");
System.out.println(" * * * * * *");


}
}