Ad

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Wednesday, August 21, 2013

Prime Numbers by Sieve Algorithm

Check whether the sum of all printed prime numbers are equal to the given input or not ? Sample Input: 5 Sample Output: Prime list: 1, 2, 3, 5, The sum is:11 The sum is not equal to 5 Source Code: #include<stdio.h>#include<math.h&g...

Making Pattern by C Program

****** ***** **** *** ** * ** *** **** ***** ****** 1 12 123 1234 12345 123456 12345 1234 123 12 1 Source Code :    #include<stdio.h>int main(){    int i,...

Tuesday, August 20, 2013

Drawing Face by using Java Applet

import java.awt.*;import javax.swing.*;public class Face extends JApplet{    public void paint(Graphics g)   ...

Insertion Sort

Insertion Sort by using C Program #include<stdio.h> int main(){  int i, j, s, temp, a[100];  printf("Enter total elements: ");  scanf("%d",&...

Monday, August 19, 2013

Coin Distribution Problem

Coin Distribution by Using C Program           Problem:- Suppose, You have 100 coins which need to be distributed among 3 beggars A, B, C. In how many ways can you distribute these 100 coins among the 3 beggars ? Constraint: A cannot have more than 75 coins, B cannot have more than 50 coins, and C cannot have more than 25 coins.  We can solve this problem by writing a simple code in C. The code is here.............   Solution:- #include<stdio.h&g...