Skip to content

Instantly share code, notes, and snippets.

View sprintr's full-sized avatar
🎯
Focusing

Amin Ullah sprintr

🎯
Focusing
View GitHub Profile
/**
* @author Amin Ullah Khan
* @copyright Amin Ullah Khan 2013
* @licence MIT, GPL, LGPL
*/
#include <iostream>
using namespace std;
class CBox {
#include <iostream>
using namespace std;
class Langoor {
public:
// Default constructor. => 1
Langoor() {
// No arguments have been provided, so we can set default values.
#include <iostream>
using namespace std;
class Student {
private:
string name;
public:
#include <iostream>
using namespace std;
class Distance {
private:
int feet;
double inches;
public:
#include <iostream>
#include <string>
using namespace std;
class Circle {
private:
double radius;
string color;
@sprintr
sprintr / bubblesort.cpp
Created February 10, 2013 17:09
The simplest bubble sorting example in cpp!!!
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int list[]={9, 1, 4, 2, 8};
int i, j;
@sprintr
sprintr / basicHTML.html
Created January 28, 2013 10:44
Basic HTML Tags
<html>
<head>
<title>My First Page</title>
</head>
<body>
<ol type="i" start=3>
<li><font face="verdana" size=2>Syed Hizbullah</font></li>
<li><font face="arial" color="#ff0000">Muheeb Ullah</font></li>
</ol>
@sprintr
sprintr / dowhile.cpp
Last active December 11, 2015 18:38
An example of do while
#include <cstdlib>
#include <iostream>
using namespace std;
// standard c++
int main(int argc, char *argv[])
{
// even if (choice = 'N'), do will run once
char choice = 'Y';
@sprintr
sprintr / ageintoseconds.cpp
Created January 26, 2013 13:11
Age into seconds calculator
#include <iostream.h>
void main(void)
{
int age = 0, ageInSeconds = 0;
cout << "Enter your age: " << endl;
cin >> age;
ageInSeconds = age * 365 * 24 * 60 * 60;
@sprintr
sprintr / areaofaroom.cpp
Created January 26, 2013 13:09
Calculates and prints the area of a room
#include <iostream.h>
void main(void)
{
int width, length, area;
cout << "Enter the width of the room: " << endl;
cin >> width;
cout << "Enter the length of the room: " << endl;