Skip to content

Instantly share code, notes, and snippets.

@snadahalli
snadahalli / Todo.js
Created Jun 21, 2013
Model validation in Backbone.js
View Todo.js
var Todo = Backbone.Model.extend({
url: '/todo',
defaults: {
'itemtext' : '',
'priority': ''
},
validate: function (attrs) {
View helloworld.c
/*Program for hello world without using Semicolon */
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes, contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
* Happy Coding
***********************************************************/
@snadahalli
snadahalli / isosceles_area.c
Created Sep 26, 2013
A C program to find the area of an isosceles triangle. For more, head to www.c-program-example.com
View isosceles_area.c
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/
@snadahalli
snadahalli / do-while.cpp
Created Oct 1, 2013
Sum & average of n numbers.
View do-while.cpp
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double sum =0, i=0, n , grade=0;
cin >> n;
@snadahalli
snadahalli / classify_triangle.c
Created Oct 1, 2013
Write a C program to classify a given triangle as equilateral, isosceles or scalene
View classify_triangle.c
/* Write a C program to classify a given triangle as equilateral, isosceles or scalene */
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
* This program was originally published at
@snadahalli
snadahalli / find_array.c
Created Oct 16, 2013
C Program to find the array c such that c[i]=a[i]+b[n-1-i].
View find_array.c
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/
@snadahalli
snadahalli / biggestof3.c
Created Oct 17, 2013
C program to find a biggest of given 3 numbers.
View biggestof3.c
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
* This program was originally posted at
* http://www.c-program-example.com/2011/09/you-can-use-all-programs-on-www_30.html
* Happy Coding
@snadahalli
snadahalli / decimal_to_binary.c
Created Oct 20, 2013
Write a C program to convert a given decimal number to Binary.
View decimal_to_binary.c
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* This program was originally published at
* http://www.c-program-example.com/2011/09/you-can-use-all-programs-on-www_8419.html
@snadahalli
snadahalli / binary_search.c
Created Oct 21, 2013
Binary search on integer arrays.
View binary_search.c
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
* This program was originally published at
* http://www.c-program-example.com/2011/09/c-program-for-binary-search.html
* Happy Coding
@snadahalli
snadahalli / fibonacci.c
Created Oct 24, 2013
C program to generate first n Fibonacci numbers.
View fibonacci.c
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use the
* programs for commercial purposes,
* contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
* Happy Coding
***********************************************************/