d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > User Blogs > 100 Days Of Programming Challenge. > Java
123Next
Add Reply New Topic
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 21 2017 05:34am
this is pretty much a dear diary post, but the goal is to code everyday for 100 days for atleast an hour and to keep keep daily tabs and kinda journal it and then link all my projects to my github. but anyways wish me luck.
so i can measure how much i improve.

This post was edited by Morphed on Oct 21 2017 05:37am
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 21 2017 05:39am
day one wrote 8 programs todays, im learning a new library today how exciting
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 21 2017 03:32pm
Code
public class UsingVaribles {
public static void main ( String[] args) {

int roomNumber;
double e;
String computerScience;

roomNumber = 113;
e = 2.71828;
computerScience = " I am learning a bit about computer science";

System.out.println( "this is room #" + roomNumber );
System.out.println( "e is close to " + e );
System.out.println ( computerScience );




}
}
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 21 2017 09:58pm
Code
import.java.until.Scanner;
public class NameAgeSalary
{
public static void main (String[] args)
Scanner keyboard = Scanner(System.in);
int age;
String name;
double salary;

System.out.println( "Hello What is your name? ");
name = keyboard.next();

System.out.println( "Hi" + name + "how old are you")
age = keyboard.nextInt();

System.out.println( "So , you're 37 , eh, That s not old at all")
System.out.println ( "How much do you make," + name);
salary = keyboard.nextDouble();

System.out.println("I hope thats per hour and not per year" );
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 21 2017 10:05pm
Code
public class Variables {
public static void main(String[] args) {

int myNumber;
boolean isFun;
char movieRating;

myNumber = 42;
isFun = true;
movieRating = 'A';
}
}
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 22 2017 12:18am
Code
import java.util.Scanner;
public class MoreUserInput {}
{
public static void main(string[] args)
{
Scanner keyboard = new Scanner (System.in);
int grade, id;
double gpa;
String firstName, lastName, login;
System.out.println("Please enter the following information so i can sell it for profit.");

System.out.println(" What is your first name?" );
firstName = keyboard.next();

System.out.println( "What is your last name ?");
lastName = keyboard.next();

System.println("What grade are you in?");
grade = keyboard.nextInt();

System.println("What is your student ID");
id = keyboard.nextInt();

System.println ("please enter your login id");
login = keyboard.next();

System.println("what is your gpa");
gpa =keyboard.nextDouble();
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 22 2017 12:34am
Code
import java.util.Scanner;
public class AgeInFiveYears
{
public static void main( string[] args )
{
Scanner keyboard = new Scanner(System.in);
Int age, AgeInFiveYears, AgeFiveYearsAgo;
String name;

System.out.println("What is your name");
name = keyboard.next();

System.out.println("What is your age");
age = keyboard.nextInt();
AgeInFiveYears = age + 5;
AgeFiveYearsAgo = age -5;

System.out.println(" Did you know in five years you will be " + AgeInFiveYears);
System.out.println(" And five years ago you were" + AgeFiveYearsAgo " Imagine that");

Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 22 2017 12:52am
Code
import.util.Scanner;
public class DumbJavaCalculator;
{
public static void main (String [] args)
{
Scanner keyboard = new Scanner(System.in);

Double firstNumber, secondNumber, thirdNumber,

System.out.println(" What is your first number?");
firstNumber = keyboard.nextDouble();

System.out.println( "What is your second number");
secondNumber = .keyboard.nextDouble();

System.out.println ("What is your third number? ");
thirdNumber = keyboard.nextDouble();

System.out.println(firstNumber + secondNumber + thirdNumber *2);
}
}
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 22 2017 01:08am
Code
public class WhatIf
[
public static void main( string[] args)
{
int people = 20;
int cats = 30;
int dogs = 15;

if ( people < cats )
{
System.out.println("Too many cats ! The world is doomed!");
}

if (people > cats)
{
System.out.println( " Not to many Cats ! the world is saved");
}

if ( people < dogs)
{
System.out.println("the world is drooled on !");
}

dogs += 5;

if (people >= dogs)
{
System.out.println(" People are greater than or equal to dogs.");
}

if ( people == dogs)
{
System.out.println( "People are dogs");
}

}

}
}
Member
Posts: 11,849
Joined: Apr 21 2008
Gold: 572.25
Oct 22 2017 01:19am
Code
import java.util.Scanner;
public class howoldareyou
{

}
public static void main( string [] args)
{
Scanner keyboard = new Scanner(System.in);
int age;

System.out.println ("what is your age");
age = keyboard.nextInt();

if (age < 16 )
{
System.out.println (" You Cant Drive");
}
if (age < 18 )
{
System.out.println (" You cant Vote");
}
if (age < 25
{
System.out.println("You cant rent a car");
}
if (age > 25 )
{
System.out.println ("You can do anything thats legal");
}
Go Back To User Blogs Topic List
123Next
Add Reply New Topic