Skip to content

Instantly share code, notes, and snippets.

View rahuladream's full-sized avatar
🏁
Towards Goal

Rahul Singh rahuladream

🏁
Towards Goal
View GitHub Profile
@rahuladream
rahuladream / bubble_sort.cpp
Created October 9, 2017 20:10
Bubble Sort
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a[6] = {5,1,6,2,3};
int i,j,temp;
for(i=0; i<6; i++)
{
int flag=0;
for(j=0; j<(6-i); j++)
@rahuladream
rahuladream / SmartAssembly.cpp
Last active October 4, 2017 18:37
Set of commands given were: 1. ECHO 1: prints the number. Eg. ECHO 1 prints 1 2. Exit: exits the program. 3. SET a 0: assign variable a value 0. 4. ADD 2 3 z: this means z = 2+3 assign sum of first two values to third one. 5. GOTO and LABEL: works as label and Goto defined in c language but label can be before or after goto 6. IF and END: If IF …
#include<bits/stdc++.h>
using namespace std;
map<string,int>var;
void sett(string s,string ss){
if(var.find(ss) != var.end()){
var[s]=var[ss];
}else if(ss[0]>=48 && ss[0]<=57){
var[s]=stoi(ss);
}else{
var[s]=0;