Skip to content

Instantly share code, notes, and snippets.

View AhmedNazir's full-sized avatar
🤒
Out sick

Ahmed Nazir AhmedNazir

🤒
Out sick
View GitHub Profile
@AhmedNazir
AhmedNazir / HcfLcf.c
Last active December 7, 2017 17:18
A Program of HCF & LCF among two Integer
#include <stdio.h>
int hcf(int a,int b);
int lcf(int a,int b);
int x;
int main(void)
{
int a,b;
printf("Enter First Integer\n");
@AhmedNazir
AhmedNazir / HcfLcf.c
Created December 8, 2017 07:49
Print HCF & LCF of N numbers. ( simple process/algorithm )
#include<stdio.h>
int main (void)
{
int n,lcf,hcf,j,max,min,flag;
//input number.......
printf("How many number do you want to input : ");
scanf("%d",&n);
int a[n];
#include <iostream>
using namespace std;
class student
{
float mark[7];
void avg();
float avgReturn();
#include<iostream>
void BubbleSort(int a[],int n);
using namespace std;
int main ()
{
int a[]= {12,11,13,5,6};
int n= sizeof(a)/sizeof(a[0]);
#include<iostream>
using namespace std;
class a
{
int roll;
int theory[5];
public:
void InputRoll()
{
#include<stdio.h>
int main()
{
char a[102400];
int i=0;
printf("Paste your Source Code\nAfter pasting, please press Ctrl+Z \n\n");
while(a[i]!=EOF)
#include <stdio.h>
#include <stdlib.h>
int BigMod(base,power,mod);
int main()
{
int base=9;
int power=101154;
int mod=11;
int result=BigMod(base,power,mod);
@AhmedNazir
AhmedNazir / BFS.cpp
Created October 15, 2018 05:50
Breadth First Search (BFS) using VECTOR, QUEUE STL in C++ (simple way)
#include <iostream>
#include<vector>
#include<queue>
using namespace std;
int main()
{
int totalEdges,totalNodes;
cout<<"Total Nodes : ";
cin>>totalNodes;
@AhmedNazir
AhmedNazir / ip.py
Created April 5, 2019 10:46
IP Info | Two Data Provider | Fast | Command line Result | Python Script
import json
import urllib.request
alter = False
IP = ''
while True:
@AhmedNazir
AhmedNazir / dice.py
Created May 9, 2019 18:56
Simple python program solution (19486531)
length = int(input()) # Inputting Length
# input() is used to take user argument. It always returns as string.
# But "length" should be integer. int() function is used to convert from string to integer.
# (YOU CAN SKIP IT) By The way, python has a built in function 'len()'. It can be used to get length of triel. Thats why, user does not need to input length. length = len(triel). But it is given in question to take length from user, so we may take it.
triel = input() # Inputting triel
# input() function takes input from user and returns as a string.
# We should triel as a string. Because triel can be very long (1000000 digit). As we explore every character/digit, String helps us to do that.