Skip to content

Instantly share code, notes, and snippets.

View rajeevs1992's full-sized avatar

Rajeev Sreedharan rajeevs1992

View GitHub Profile
@rajeevs1992
rajeevs1992 / dangle.c
Created December 19, 2011 17:00
A program with the dangling else
#include<stdio.h>
#define CUBE(n) n*n*n
int armstrong(int n);
int prime(int n);
int main()
{
int n,i;
printf("\nEnter number ");
scanf("%d",&n);
if(armstrong(n))
@rajeevs1992
rajeevs1992 / polyadd.c
Created December 18, 2011 09:41
A program to add two polynomials using linklists
#include<stdio.h>
#include<stdlib.h>//For malloc
struct node
{
int exp;
int coefft;
struct node *next;
};
char getch()