HTML5

HTML5 is Hypertext Markup Language (HTML).One of the major changes in HTML5 is in respect to how HTML addresses Web applications.Other new features in HTML5 include specific functions for embedding graphics, audio, video, and interactive documents.

Sunday, 26 July 2015

Waqar Khan KPSI} WAQAR & FAHEEM

...

Wednesday, 8 July 2015

Pattern Printing in C++

#include<iostream> using namespace std; int main() { int first=0; int count=0; int space=1; space=6-1; for(first=0;first<6;first++){ for(count=0;count<space;count++){ cout<<" "; space--; for(count=0;count<2*first-1; count++){ cout<<"*"; } space=1; cout<<endl; } } ...

Daimond pattern by inputing number of rows in C++

#include<iostream> using namespace std; int main() { int n,c,f,space=1; cout<<"enter a num of rows: "; cin>>n; space=n-1; for(f=1; f<=n; f++) { for(c=0; c<space; c++) cout<<" "; space--; for(c=0; c<2*f-1; c++) cout<<"*"; cout<<endl; } space=1; for(f=1; f<=n-1; f++){ for(c=1; c<=space;...

Amazing Daimond in C++

#include<iostream> #include<conio.h> using namespace std; int main() { cout<<"\n ********* Diamond *********\n"<<endl; int gotoxy; int x_1=19; int y_1=5; for(int count_1=1;count_1<=5;count_1++) { for(int count_2=1;count_2<=count_1;count_2++) cout<<"* "; x_1--; y_1++; cout<<endl; } int x_2=16; int y_2=10; for(int...

Pattern in C++

#include<iostream> using namespace std; int main() { int i,s,a,d; cout<<"enter the num: "; cin>>a; for(i=1; i<=a; i++){ for(d=1; d<=i; d++){ cout<<" "; cout<<"*"; for(s=1; s<=i; s++){ } } cout<<endl; ...

Write a c++ program that tell us the number is positive or negative

#include<iostream> using namespace std; int main() { int a; cout<<"enter a num: "; cin>>a; if(a>0){ cout<<"num is Positive:"<<endl; }else if(a<0){ cout<<"num is -ve: "<<endl; }else cout<<"num is zero"<<endl...

How to find largest number in C++

#include<iostream> using namespace std; int main() { int a,b,c; cout<<"Enter first Value: "; cin>>a; cout<<"\nEnter second Value: "; cin>>b; cout<<"\nEnter third Value: "; cin>>c; if(a>b && a>c){ cout<<"Largest Number is: "<<a; }else if(b>a && b>c){ cout<<"Largest...

Count number of line in c++

#include<iostream> using namespace std; int main() { int a=0,b=0,c=0,d=0; char y; cout<<"Choose the right option from the following question. \n\n"; for(int x=1; x<=3; x++) { cout<<x; cout<<"The colour of sky is_______? \n"; cout<<"\na)whilte\tb)black\nc)blue\t\td)green\n"; cin>>y; if(y=='a') ...

Alphabet to ASCII in C++

#include<iostream> #include<conio.h> using namespace std; int main() { char a; int b; cout<<"Enter Alphabet: "; cin>>a; b=(int)a; cout<<b; return 0...

prime number in c++

#include<iostream> using namespace std; int main() { int num; int i=2; int c=0; do{ cout<<"Enter a num: "; cin>>num; while(i<num){ if(num%i==0){ c++; } i++; } { if(c==0){ cout<<"Num is Prime:\n\n"; }else cout<<"Num is Not Prime:\n\n"; }     }while(num==num);   return 0...

Ascending or descending Order in C++

#include<iostream> using namespace std; int main() { int a,b,c; cout<<"enter a three numbers:"<<endl; cin>>a>>b>>c; if(a<b || b<c){ cout<<"numbers in ascending order:\n\n"; cout<<a<<"\t"<<b<<"\t"<<c; }else if(b<a || a<c){ cout<<"numbers in...

Even/Odd in c++

#include<iostream> using namespace std; int main() { int a; cout<<"enter a num: "; cin>>a; if(a%2==0){ cout<<"Num is even\n"; }else cout<<"Num is odd\n"; return 0...

Simple Calculator in C++

#include<iostream> using namespace std; int main() { char op; double a,b,c; do{ cout<<"\t\t\t\"Calculator\" \n"; cout<<"Enter first value: "; cin>>a; cout<<"Enter operator... +, -, /, * ... "; cin>>op; cout<<"Enter second value: "; cin>>b; if(op=='+') c=a+b; if(op=='-') c=a-b; if(op=='*')...

Keyboard Shorcuts (Microsoft Windows)

Keyboard Shorcuts (Microsoft Windows) 1. CTRL+C (Copy) 2. CTRL+X (Cut) 3. CTRL+V (Paste) 4. CTRL+Z (Undo) 5. DELETE (Delete) 6. SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin) 7. CTRL while dragging an item (Copy the selected item) 8. CTRL+SHIFT while dragging an item (Create a shortcut to the selected...

Switch Statement Example Program

Switch Statement Example Program #include<iostream> using namespace std; int main() { int age; cout<<"Enter your age? "; cin>>age; switch(age){ case 16: cout<<"u are too young"; break; default: cout<<"you are elligible"; } ...

Gotoxy concept with example program

Gotoxy concept with example program #include<iostream> #include<conio.h>  #include<windows.h> using namespace std;   void gotoxy (short x , short y){ COORD pos = {x , y}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE) , pos);} int wall(){     int xpos,ypos;      ...

Calculatar in C++

Calculatar in C++ #include<iostream> #include<cmath> using namespace std; int main () { float a,b,PI; int input; cout<<endl; cout<<"******************************* Calculator *************************************\n"; cout<<"================================================================================\n"; ...

How to make a diamond in C++?

How to make a diamond in C++? #include<iostream> using namespace std; void star(int ); int main() { int n; cout<<"Enter num of rows: "; cin>>n; star(n); } void star(int rows){ for(int i=1;i<=rows;i++){ for(int j=rows;j>=i;j--){ cout<<" "; } for(int x=1;x<=i;x++){ cout<<"*"<<" "; ...

Program using Gotoxy

The basic Concept of Gotoxy #include<iostream> #include<stdio.h> #include<windows.h> #include<conio.h> using namespace std; int key_press(); int food(); int wall(); void AltEnter(); int reset(); void gotoxy(int,int); HANDLE  hStdout;   void gotoxy (short x , short y){ COORD pos = {x , y}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE)...

How to merge two arrays?

How to merge two arrays? #include<iostream> using namespace std; int main() { int a1[5]={5,2,4,6,1}; int a2[5]={10,7,8,3,9}; int a3[10]={0};     int k=0; for(int i=0;i<10;i++){ if(i>4){ a3[i]=a2[k++]; } a3[i]=a1[i]; } for(int j=0;j<10;j++){ cout<<a3[j]<<", "; ...