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.
CSS3
CSS3 is Cascading Style Sheets It brings a lot of long-awaited novelties, like rounded corners, shadows, gradients, transitions or animations, and make Website more attractive.
JavaScript
JavaScript is a programming language commonly used in web development. Mostly use to create effects in Websites
C++
C++ is a Programming Language most of the Software like Windows , Unix are developed in C++ it can run on many IDE's Like Dev C++ or Visual Studio.
Artificial intelligence (AI)
Artificial intelligence mostly is about a machine is working automaticaly or not? so it when we say automatic then its obviously means that the Robots are part of it.
Sunday, 26 July 2015
Wednesday, 8 July 2015
Pattern Printing in C++
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++
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; c++)
cout<<" ";
space++;
for(c=1; c<=2*(n-f)-1; c++)
cout<<"*";
cout<<endl;
}
}
Amazing Daimond in C++
#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 count_3=5;count_3>1;count_3--)
{
for(int count_4=count_3;count_4>1;count_4--)
cout<<"* ";
x_2++;
y_2++;
cout<<endl;
}
getch();
return 0;
}
Pattern in C++
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
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++
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 Number is: "<<b;
}else
if(c>b && c>a){
cout<<"Largest Number is: "<<c;
}else
cout<<"\n\n\t\tAll number are equal";
}
Count number of line in c++
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')
a++;
if(y=='b')
b++;
if(y=='c')
c++;
if(y=='d')
d++;
cout<<"\n\n\n";
}
cout<< "option a has been answered "<<a<<" times"<<endl;
cout<< "option b has been answered "<<b<<" times"<<endl;
cout<< "option c has been answered "<<c<<" times"<<endl;
cout<< "option d has been answered "<<d<<" times"<<endl;
cout<<"\n\nThe Right option is \'c\' ";
}
Alphabet to ASCII in C++
#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++
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++
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 ascending order:\n\n";
cout<<b<<"\t"<<a<<"\t"<<c;
}else
if(c<b || b<a){
cout<<"numbers in ascending order:\n\n";
cout<<c<<"\t"<<b<<"\t"<<a;
}
}
Even/Odd in c++
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++
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=='*') c=a*b;
if(op=='/') c=a/b;
cout<<"The Answer is: "<<c<<"\n\n";
cout<<"--------------------------------------------------------------"<<"\n\n";
}while(op!='d');
return 0;
}
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 item)
9. F2 key (Rename the selected item)
10. CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
11. CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
12. CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
13. CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
14. CTRL+SHIFT with any of the arrow keys (Highlight a block of text)
SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document)
15. CTRL+A (Select all)
16. F3 key (Search for a file or a folder)
17. ALT+ENTER (View the properties for the selected item)
18. ALT+F4 (Close the active item, or quit the active program)
19. ALT+ENTER (Display the properties of the selected object)
20. ALT+SPACEBAR (Open the shortcut menu for the active window)
21. CTRL+F4 (Close the active document in programs that enable you to have multiple documents opensimultaneou sly)
22. ALT+TAB (Switch between the open items)
23. ALT+ESC (Cycle through items in the order that they had been opened)
24. F6 key (Cycle through the screen elements in a window or on the desktop)
25. F4 key (Display the Address bar list in My Computer or Windows Explorer)
26. SHIFT+F10 (Display the shortcut menu for the selected item)
27. ALT+SPACEBAR (Display the System menu for the active window)
28. CTRL+ESC (Display the Start menu)
29. ALT+Underlined letter in a menu name (Display the corresponding menu) Underlined letter in a command name on an open menu (Perform the corresponding command)
30. F10 key (Activate the menu bar in the active program)
31. RIGHT ARROW (Open the next menu to the right, or open a submenu)
32. LEFT ARROW (Open the next menu to the left, or close a submenu)
33. F5 key (Update the active window)
34. BACKSPACE (View the folder onelevel up in My Computer or Windows Explorer)
35. ESC (Cancel the current task)
36. SHIFT when you insert a CD-ROMinto the CD-ROM drive (Prevent the CD-ROM from automatically playing)
Dialog Box - Keyboard Shortcuts
1. CTRL+TAB (Move forward through the tabs)
2. CTRL+SHIFT+TAB (Move backward through the tabs)
3. TAB (Move forward through the options)
4. SHIFT+TAB (Move backward through the options)
5. ALT+Underlined letter (Perform the corresponding command or select the corresponding option)
6. ENTER (Perform the command for the active option or button)
7. SPACEBAR (Select or clear the check box if the active option is a check box)
8. Arrow keys (Select a button if the active option is a group of option buttons)
9. F1 key (Display Help)
10. F4 key (Display the items in the active list)
11. BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box)
Microsoft Natural Keyboard Shortcuts
1. Windows Logo (Display or hide the Start menu)
2. Windows Logo+BREAK (Display the System Properties dialog box)
3. Windows Logo+D (Display the desktop)
4. Windows Logo+M (Minimize all of the windows)
5. Windows Logo+SHIFT+M (Restorethe minimized windows)
6. Windows Logo+E (Open My Computer)
7. Windows Logo+F (Search for a file or a folder)
8. CTRL+Windows Logo+F (Search for computers)
9. Windows Logo+F1 (Display Windows Help)
10. Windows Logo+ L (Lock the keyboard)
11. Windows Logo+R (Open the Run dialog box)
12. Windows Logo+U (Open Utility Manager)
13. Accessibility Keyboard Shortcuts
14. Right SHIFT for eight seconds (Switch FilterKeys either on or off)
15. Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
16. Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
17. SHIFT five times (Switch the StickyKeys either on or off)
18. NUM LOCK for five seconds (Switch the ToggleKeys either on or off)
19. Windows Logo +U (Open Utility Manager)
20. Windows Explorer Keyboard Shortcuts
21. END (Display the bottom of the active window)
22. HOME (Display the top of the active window)
23. NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder)
24. NUM LOCK+Plus sign (+) (Display the contents of the selected folder)
MMC COnsole Windows Shortcut keys
1. SHIFT+F10 (Display the Action shortcut menu for the selected item)
2. F1 key (Open the Help topic, if any, for the selected item)
3. F5 key (Update the content of all console windows)
4. CTRL+F10 (Maximize the active console window)
5. CTRL+F5 (Restore the active console window)
6. ALT+ENTER (Display the Properties dialog box, if any, for theselected item)
7. F2 key (Rename the selected item)
8. CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console)
Remote Desktop Connection Navigation
1. CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box)
2. ALT+PAGE UP (Switch between programs from left to right)
3. ALT+PAGE DOWN (Switch between programs from right to left)
4. ALT+INSERT (Cycle through the programs in most recently used order)
5. ALT+HOME (Display the Start menu)
6. CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
7. ALT+DELETE (Display the Windows menu)
8. CTRL+ALT+Minus sign (-) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)
9. CTRL+ALT+Plus sign (+) (Place asnapshot of the entire client window area on the Terminal server clipboardand provide the same functionality aspressing ALT+PRINT SCREEN on a local computer.)
Microsoft Internet Explorer Keyboard Shortcuts
1. CTRL+B (Open the Organize Favorites dialog box)
2. CTRL+E (Open the Search bar)
3. CTRL+F (Start the Find utility)
4. CTRL+H (Open the History bar)
5. CTRL+I (Open the Favorites bar)
6. CTRL+L (Open the Open dialog box)
7. CTRL+N (Start another instance of the browser with the same Web address)
8. CTRL+O (Open the Open dialog box,the same as CTRL+L)
9. CTRL+P (Open the Print dialog box)
10. CTRL+R (Update the current Web )
Switch Statement Example Program
Switch Statement Example Program
Gotoxy concept with example program
Gotoxy concept with example program
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";
cout<<"Operations\t"<<"\tTrigonometric Functions"<<"\t\tLogarithmic Functions\n";
cout<<"================================================================================\n";
cout<<"1: Division\t\t"<<"7: Sin\t\t"<<"\t\t13: Log"<<endl;
cout<<endl;
cout<<"2: Multiplication\t"<<"8: Cos\t\t"<<"\t\t14: Log with base 10"<<endl;
cout<<endl;
cout<<"3: Subtraction\t\t"<<"9: Tan\t\t"<<endl;
cout<<endl;
cout<<"4: Addition\t\t"<<"10: Inverse of Sin"<<endl;
cout<<endl;
cout<<"5: Exponent\t\t"<<"11: Inverse of Cos"<<endl;
cout<<endl;
cout<<"6: Square root\t\t"<<"12: Inverse of Tan"<<endl;
cout<<endl;
cout<<"Enter the function that you want to perform : ";
cin>>c;
cout<<endl;
PI=3.14159265;
switch(input)
{
case 1:
cout<<"Enter 1st number : ";
cin>>first;
cout<<endl;
cout<<"Enter 2nd number : ";
cin>>second;
cout<<endl;
cout<<"Division = "<<first/second<<endl;
break;
case 2:
cout<<"Enter 1st number : ";
cin>>first;
cout<<endl;
cout<<"Enter 2nd number : ";
cin>>second;
cout<<endl;
cout<<"Multiplication = "<<first*second<<endl;
break;
case 3:
cout<<"Enter 1st number : ";
cin>>first;
cout<<endl;
cout<<"Enter 2nd number : ";
cin>>second;
cout<<endl;
cout<<"Subtraction = "<<first-second<<endl;
break;
case 4:
cout<<"Enter 1st number : ";
cin>>first;
cout<<endl;
cout<<"Enter 2nd number : ";
cin>>second;
cout<<endl;
cout<<"Addition = "<<first+second<<endl;
break;
case 5:
cout<<"Enter 1st number : ";
cin>>first;
cout<<endl;
cout<<"Enter 2nd number : ";
cin>>second;
cout<<endl;
cout<<"Exponent = "<<pow(first,second)<<endl;
break;
case 6:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Square Root = "<<sqrt(first)<<endl;
break;
case 7:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Sin = "<<sin(first)<<endl;
break;
case 8:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Cos = "<<cos(first)<<endl;
break;
case 9:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Tan = "<<tan(first)<<endl;
break;
case 10:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Inverse of Sin = "<<asin(first)*180.0/PI<<endl;
break;
case 11:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Inverse of Cos = "<<acos(first)*180.0/PI<<endl;
break;
case 12:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Inverse of tan = "<<atan(first)*180.0/PI<<endl;
break;
case 13:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Log = "<<log(first)<<endl;
break;
case 14:
cout<<"Enter the number : ";
cin>>first;
cout<<endl;
cout<<"Log with base 10 = "<<log10(first)<<endl;
break;
default:
cout<<"Wrong Input"<<endl;
}
}
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<<"*"<<" ";
}
cout<<endl;
}
for(int i=1;i<=rows;i++){
for(int j=0;j<=i;j++){
cout<<" ";
}
for(int x=rows;x>i;x--){
cout<<"*"<<" ";
}
cout<<endl;
}
}
Program using Gotoxy
The basic Concept of Gotoxy
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]<<", ";
}
}