Skip to content

Instantly share code, notes, and snippets.

for(int i = 0; i < 50; i++ ){
int lower = 1000*i + 1;
int higher = 1000*(i+1);
}
@vofp
vofp / Assignment6.cpp
Created June 5, 2012 17:29 — forked from joshua-bernick/gist:2876377
Assignment 6 - Primes
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <cmath>
using namespace std;
bool isPrime (long n);
long primeCount (long x, long y);
@vofp
vofp / Multiplication Table C
Created June 5, 2012 17:25 — forked from joshua-bernick/Multiplication Table C++
Creates a multiplication table
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <cmath>
using namespace std;
int main(void)
{
import java.util.Scanner;
import java.lang.String;
import java.io.*;
public class Main {
public static void main(String[] args) {
System.out.printf("Please enter a sentence \n");
Scanner keyboard = new Scanner(System.in);
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package lab;
import java.util.Scanner;
import java.lang.String;
import java.io.*;
@vofp
vofp / Strings.java
Created February 16, 2012 05:51
Fun with java Strings
import java.util.Scanner;
import java.lang.String;
import java.io.*;
public class Main {
public static void main(String[] args) {
System.out.printf("Please enter a sentence \n");
Scanner keyboard = new Scanner(System.in);
String str = keyboard.nextLine();
@vofp
vofp / Lab5_1.java
Created February 16, 2012 05:04
John Zeller's cs161 lab
import java.util.Scanner;
import java.lang.String;
import java.io.*;
class Lab5_1{
public static void main (String[] args)
{
System.out.printf("Please enter a sentence \n");
Scanner keyboard = new Scanner(System.in);
String str = keyboard.nextLine();
@vofp
vofp / gist:1820752
Created February 13, 2012 21:47
animated output
void DrawProgressBar(int len, double percent) {
cout << "\x1B[2K"; // Erase the entire current line.
cout << "\x1B[0E"; // Move to the beginning of the current line.
string progress;
for (int i = 0; i < len; ++i) {
if (i < static_cast<int>(len * percent)) {
progress += "=";
} else {
progress += " ";
}
hello
/**
@file main.c
@brief
@version
@mainpage
@helper John Bourgeoias
@helper Jane Doe
@section intro Code Overview