Skip to content

Instantly share code, notes, and snippets.

View janoulle's full-sized avatar

Jane Ullah janoulle

View GitHub Profile
@janoulle
janoulle / problem1.py
Created December 19, 2011 18:12
Problem 1 - Project Euler in Python by Jane Ullah
x = 0
for i in range(0,1000):
if (i%3 == 0) or (i%5 == 0):
x += i;
print('total sum is: ' + str(x));
@janoulle
janoulle / Problem2.java
Created December 19, 2011 05:13
Problem 2 - Project Euler in Java by Jane Ullah
//Author: Jane Ullah
//Date: 12/19/2011
//Site: janetalkscode.com
long a1 = 0L, a2 = 1L;
long nextTerm = 0L;
long sumEvenTerms = 0L;
boolean fourMillionthReached = false;
while ( !fourMillionthReached ) {
if (nextTerm >= 4000000) {
@janoulle
janoulle / ReversingString.java
Created December 18, 2011 15:51
Reversing a String
/**
* Author: Jane Ullah
* Purpose: Reversing a string provided by the user.
* Date: 12/18/2011
*/
import java.util.Scanner;
public class ReversingString {
public static void main(String[] args) {