Skip to content

Instantly share code, notes, and snippets.

View Shravan40's full-sized avatar

Shravan Kumar Gond Shravan40

View GitHub Profile
#include <iostream>
#include <string>
using namespace std;
long ncr(int n,int r) // This function will calculate the value of nCr
{
if((r==0)||(n==r))
return 1;
else
return (ncr(n-1,r-1)+ncr(n-1,r));
#include<stdio.h>
int main()
//predict the o/p and give with the reason
{
int i=5;
int j=6;
int k=7;
int *ptr=&k;
printf("%d\n",*ptr);
printf("%d\n",*(ptr++));
#include <iostream>
#include <string>
using namespace std;
int main()
{
int t,n,i,m;
cin>>t;
while(t--)
{
import java.io.*;
import java.util.*;
import java.lang.*;
public class main1
{
public static void main (String args[]) throws IOException
{
Centroid cent = new Centroid();
int ClustNumber;
System.out.println(" Enter the number of clusters");
#include<iostream>
#include<cmath>
using namespace std;
int gcd(int u, int v)
{
while ( v != 0)
{
int r = u % v;
#include <stdio.h>
#include <string.h>
int main()
{
char* s ;
s = "rashmi";
char temp1;
int i;
int l = strlen(s);
#include <iostream>
using namespace std;
int nChoosek( unsigned n, unsigned k )
{
if (k > n)
return 0;
if (k * 2 > n)
k = n-k;
if (k == 0)
#include <cmath>
#include <cstdio>
#include <vector>
#include<string>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int x1,y1,x2,y2,x3,y3;
int min_a = 999999999;
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
int count_lucky(int);
int main()