Skip to content

Instantly share code, notes, and snippets.

View brijeshb42's full-sized avatar

Brijesh Bittu brijeshb42

View GitHub Profile
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Button;
import android.view.View.OnClickListener;
#include<iostream>
#include<fstream>
#include<cstdio>
#include<cstring>
using namespace std;
ifstream in;
bool input(char c[4][10]){
names = ["Ben", "Ralph", "Ally", "Jenna", "Nikki", "Steve", "Emily", "Jake", "Zoey", "Harry"]
idLookup = ["0000000", "111111", "222222", "333333", "444444", "555555", "666666", "777777", "888888", "999999"]
balenceLookup = ["125", "78", "450", "12", "112", "220", "57", "93", "361", "34"]
#for i in range (0, len(names))
print("Welcome to the Balence Look-up System")
program= True
while(program):
@brijeshb42
brijeshb42 / dir.c
Created March 30, 2014 17:19
Reading files in C
#define _GNU_SOURCE
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
#include <iostream>
#include <fstream>
#include <cstdio>
using namespace std;
int main(int argc, char const *argv[])
{
fstream in("sales7.txt",fstream::in);
int m,bm,wm;
class Car{
int year;
String make;
double speed;
public Car(int y,String m,double s){
this.year = y;
this.make = m;
this.speed = s;
}
<!DOCTYPE html>
<html>
<head>
<title>Validation</title>
<style type="text/css">
span{
color: red;
}
#message{
color: blue;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Clock</title>
<style type="text/css">
table { border: none; border-collapse: collapse; }
table td { border-left: 1px solid #000; }
table td:first-child { border-left: none; }</style>
</head>
<body onload="startTime()">
#include<iostream>
#include<cmath>
using namespace std;
int bin2Dec(string binString){
int sum = 0;
int l = binString.size();
for(int i=0;i<l;i++){
if(binString[i]=='1'){
#include <stdio.h>
//use the #define directive to define "noOfElements" as 5
#define noOfElements 5
//declare the prototype of the checkRevArray function
int checkRevArray(int[],int[],int);
int main() {
int arr1[noOfElements], //use arr1 to store the 1st set of numbers the user enters
arr2[noOfElements]; //use arr2 to store the 3nd set of numbers