class demo1{ void add() { int a=10; int b=20; int c=a+b; System.out.println(c); }};class demo2 { void sub() { int a=10; int b=20; int c=a-b; System.out.println(c); }};class demo{ public static void main(String[]...
May 31, 2007
May 28, 2007
JAVA program to demonstrate parameterized function
class demo{void add(int a,int b) // method definition { int c=a+b; System.out.println(c); }};class adddemo{ public static void main(String[] args) { demo d1; d1 =new demo(); d1.add(10,20);...
JAVA program to demonstrate function
class demo{void add() // method definition { int a,b,c; a=10; b=20; c=a+b; System.out.println(c); }};class adddemo{ public static void main(String[] args) { demo d1; d1 =new demo(); ...
JAVA program to add two integers
class adddemo{ public static void main(String[] args) { int a,b,c; a=10; b=20; c=a+b; System.out.println(c); ...
May 26, 2007
C++ program to demonstrate Structure
// This program will ask user to input Basic salary and program will// calculate da 10%, hra 10%, pf 15%, fpf 20% and netamount according to// this formula : net=bs +da+hra-pf-fpf#include<iostream.h>#include<conio.h>struct student{int basicSalary;float...
May 25, 2007
Making Concentric Circles in C++ with dazzling effects:

Here is a C++ program that draw concentric circles with some special effects.#include <iostream.h>#include <graphics.h>#include <conio.h>#include <dos.h>main(){int dv,mo;dv = DETECT;initgraph(&dv,&mo,"");// logic to make...
Subscribe to:
Posts (Atom)