Skip to content

Instantly share code, notes, and snippets.

View sayantanHack's full-sized avatar

Sayantan sayantanHack

View GitHub Profile
@sayantanHack
sayantanHack / addArray.c
Created January 18, 2019 20:05
adding array elements & showing them
#include<stdio.h>
int main(void){
int i, nums[50], n;
printf("Enter the number of the array, array size max is 50 : ");
scanf("%d",&n);
// addding numbers to the array
for(i=0;i<n;i++){
scanf("%d",&nums[i]);
}
@sayantanHack
sayantanHack / Reverse.c
Created January 18, 2019 19:26
This is the mirror programewhere user gives a number which is printed in a reverse order .
#include<stdio.h>
int main(void){
int n ,newNum, num4,num3,num2,num1;
printf("Enbter any Four digit number you wanna reverse : ");
scanf("%d",&n); // taking number from users
// finding the each digits of thr number.
num4 = n/1000;
num3 = (n%1000)/100;
num2 = (n%100)/10;
@sayantanHack
sayantanHack / Fibonacci.c
Created January 18, 2019 18:36
This is the fibonacci series program , which print the series upto 15 numbers , you can increase or decrease variable n upto how many you choose to print . Happy coding !
#include<stdio.h>
int main(void){
int n=15,i,f1=0,f2=1, nextItem=0; // initializing the variables
for(i=0;i<n;i++){
printf("%d ", f1); // printing variables
nextItem= f1+f2; // fibo algo
f1=f2; // exchanging the values
f2= nextItem;
#include<stdio.h>
#include<cs50.h>
#include<string.h>
int main(int argc, string argv[])
{
if(argc!=4){
return 1;
}
@sayantanHack
sayantanHack / paterns.py
Created April 20, 2018 20:39
This is a very simple code for paterns of numbers.
'''
code forthe patern bellow :
1
12
123
1234
12345
'''
n = input("Enter the num : ")
@sayantanHack
sayantanHack / card.html
Created April 6, 2018 23:04
Udacity Animal Card
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
<title>Animal Trading Cards</title>
</head>
<body>
<div class="Cards">
<!-- your favorite animal's name goes here -->