Hyper Text Markup Language (HTML)

Hyper Text Markup Language (HTML)

HTML (Hyper Text Markup Language) is a tag based scripting language, interpreted by browser. The hypertext is a nonlinear text. It has a capacity to open door of other related information or files. When it is clicked, something new must be appeared. Tags and attributes of HTML documents tell browsers how to display documents. Version Comments HTML HTML was first time invented by British scientist named Tim Berners Lee while he was working in laboratory at Cern, Switzerland on practical Physics (1980). HTML + HTML + is...

read more

Computer Graphics Concepts

Computer Graphics Concepts

“The picture worth’s, thousand words” is very famous Chinese saying. Really, literate can read few sequences of characters but all can read the picture. It is out of bondage of literacy. Almost of high level language supports graphics and this facility of language is exploited in building of GUI (Graphical User Interface). The computer graphics is concern with generation, representation, manipulation and display of pictures with the aid of computer. It may be divided into three broad area (a) generative graphics, (b) cognitive...

read more

C++ Program to Read a Set of Lines

This is a program to read a set of lines and find out the number of characters, word and lines in a given text and display each word of the text in different lines. #include<iostream.h> #include<conio.h> Void main () { Int i=0, linecount=1, wordcount=1; Char str [100]; Clrscr (); Cout<<”\n Enter the lines”; Cin.get (str, 100, ‘#’); Do { If (str[i] ==’’ ?? str [i] ==’\n’) { Wordcount++; } If (str[i] ==’\n’) { Linecount++; } I++; } While (str[i]! = ‘\o’); Cout<<”\n the number of characters...

read more

C++ program using multiple inheritance

This program consists of two base classes and one derived class. The base class “Stuinfo” contains the data members: name, roll. And another base class “Stuacademic info” contains the data members: course and semester. The derived class “stuaddressinfo” contains the data members: address only. #include<iostream.h> #include<conio.h> Class Stuinfo { Private: Char name [25]; Int roll; Public: Void getdata () { Cout<<”\n Enter name”; Cin>>name; Cout<<”\n Enter roll”; Cin>> roll; } Void...

read more

C++ Program to add two complex number

Operator overloading is the process by which pre-defined symbols like “+”, “-”, “<=” gets additional meaning. This program is  used to add two complex number using operator overloading. #include<iostream.h> #include<conio.h< Class sample { Private: Int x, y; Public: Void getdata () { Cout<<”\n Enter value of x and y of complex number”; Cin>>x>>y; } Sample operator + (sample obj) { Obj.y = x+obj.x; Obj.y =y +obj.y; Return (obj); } Void display () { Cout<<”\n...

read more

C++ Program to Find Interest

Constructor can be defined as the member function, which has the same name of the class. the object created by the constructor is destroyed with the help of destructor. This is a program to find the interest using constructor. #include<iostream.h> #include<conio.h> Class interest { Private: Float principle, time, rate, interest; Public: Interest (); Interest (float, float, float); Void display (); }; Interest:: interest () { Interest =0; Principle = 0; Time=0; Rate=0; } Interest:: Interests (float p, float t, float...

read more

C++ Program using If-else Statement

This program shows the simple use of if-else statement. In this condition, if one statement goes wrong, other condition is applied. This is a program to find a leap year. #include<iostream.h> #include<conio.h> Void main () { Int year; Clrscr (); Cout<<”\n enter year (in 4- digits)”; Cin>>year; If (year % 100==0) { If (year % 400 == 0) Cout<<”\n leap year”; Else Cout<<”\n not a leap year”; } Else If (year % 4 ==0) Cout<<”\n leap year”; Else Cout<<”\n not a leap year”; getch...

read more

C++ program Showing multi-dimensional array

This program is an example for multi-dimensional array. Array can be defined as a group of similar objects, refrenced by the common name. This is a program to read sales of 10 districts in 12 months and calculate total sales of each district. #include<iostream.h> #include<conio.h> Void main () { Int district =10; Int month =12; Float sales [district] [month]; Int I, j; Float total; For (=0; i<10; i++) { Total=0; For (j=0; j<12; j++) { Cout<<”\n enter sales for district”<<i+1<<”for...

read more

C++ Program showing assignment operator overloading

The symbol ‘=’ is used as Assignment operators. It is used to assign a value of result for an expression. This is a sample program showing the overloading of  Assignment operators in c++. #include<iostream.h> #include<conio.h> Class sample { Private: Int x, y; Public: Void getdata () { Cout <<” \n enter the value of x and y”; Cin>> x>>y; } Void operator = (sample obj) { X= obj.x; Y= obj.y; } Void display () { Cout<<”\n value of x”<<x; Cout<<”\n value of...

read more

C++ Program showing constructor overloading

Constructor is a member function with the same name as of it’s class. This program is used to find the perimeter of square using constructor overloading. #include<iostream.h> #include<conio.h> Class perimeter { Int l, b, p; Public: Perimeter () { Cout<<”\n Enter the value of l and b”; Cin>>l>>b; } Perimeter (int a) { L=b=a; } Perimeter (int l1, int b1) { l=l1; b=b1; } Perimeter (perimeter and peri) { l= peri.l; b= peri.b; } Void calculate () { P = 2* (l +b) Cout <<p; } }; Void main () { Perimeter...

read more
Page 1 of 812345...Last »