Skip to content

Instantly share code, notes, and snippets.

View syedjafer's full-sized avatar
🎯
Focusing

syedjafer_k syedjafer

🎯
Focusing
View GitHub Profile
@syedjafer
syedjafer / matrain.py
Last active August 27, 2017 15:45
Matrix Rain
import time,random
items = [chr(i) for i in range(0x30a1, 0x30ff + 1)] # katakana
for i in range(1,11): # spaces and numbers
items.append(str(i))
items.append(" "*i)
def rain(row,column): # rows,columns
@syedjafer
syedjafer / find.sh
Created October 11, 2017 13:49
Printing all the files in current Directory .
find . -print
@syedjafer
syedjafer / snake_matirx.c
Created March 25, 2018 04:56
Program to print a snake matrix without using arrays . Input will be given . Eg : 4
#include<stdio.h>
int main()
{
int num;
scanf("%d",&num);
int range = num;
int spaces = num * 2 ; // for spaces
int i,count=0,val=1,val_range=1;
while(range>0)
{
@syedjafer
syedjafer / latin_matrix.c
Created March 25, 2018 04:57
latin_matrix .
#include<stdio.h>
int main()
{
int num,i;
scanf("%d",&num);
int range = num , val = num ,val_range = num;
while(range>0)
{
@syedjafer
syedjafer / binary_decimal.c
Created March 25, 2018 05:00
A positive integer which comprise of only zeros and ones called Binary-Decimal . To represent the given input in binary decimal , with the minimum count
#include<stdio.h>
int main()
{
int num;
scanf("%d",&num);
int res , val_11 , val_10 ,i;
if(num%11 ==0)
def find_sum(a, b):
res = 0
if( a < b ):
for item in range(a, b+1):
res += item
else:
for item in range(b, a+1):
res += item
return res
class Node:
def __init__(self, data):
self.item = data
self.nref = None
self.pref = None
nums = input().split(",")
total_elem = len(nums)
output_nums = list()
while total_elem:
ouput_nums.append(nums[total_elem-1])
total_elem -= 1
print(output_nums)
public class ReverseNum{
public static void main(String []args){
int arr[] = {1, 2, 3, 4, 5, 6};
int output_array[]=new int[6];
for (int itr=0, ctr=5; ctr >=0; ctr--, itr++){
output_array[itr] = arr[ctr];
}
for(int itr=0; itr<6; itr++){
System.out.println(output_array[itr]);