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.

Showing posts sorted by relevance for query c++. Sort by date Show all posts
Showing posts sorted by relevance for query c++. Sort by date Show all posts

Saturday, 30 January 2016

Snake Game in C++ with Loading

Project in C++

Loading Function in C++

Snake Game in c++

Free Download

Decrption:

                This is Snake game Project in C++ with amazing Functionality of loading it also tells the Score of the Snake the game will terminate when it hits the wall or itself

Saturday, 24 December 2016

Introduction of C++

C++

C++ is actually a Programming Language Also a General Purpose language.The Most interesting thing is many Softwares based on This language i.e Linux It was created by Bjarne Stroustrup
it can Run on many IDE's like Dev C++, Visual Studio any version is also an Object Oreinted Machine like Java, Most of the people going to use java language instead of C that is the reason C# is been Developed 

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;
}


}






}

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;
}

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;
}

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; c++)
cout<<" ";
space++;
for(c=1; c<=2*(n-f)-1; c++)
cout<<"*";
cout<<endl;
    }

}

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 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;
}

}

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;
}

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 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;
}

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 Number is: "<<b;
}else
if(c>b && c>a){
cout<<"Largest Number is: "<<c;
}else
cout<<"\n\n\t\tAll number are equal";
}

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=='*') c=a*b;
if(op=='/') c=a/b;
cout<<"The Answer is: "<<c<<"\n\n";
cout<<"--------------------------------------------------------------"<<"\n\n";
  }while(op!='d');
return 0;
}

Tuesday, 26 January 2016

Inheritance in c++

Inheritance

Defination:

               In General,Inheritance means that inherit something from parents like inherited property, inherits eyes color from your parents etc.In Programming , inheritance mean define a class in term of other class it will increase the Re-useability of functionality of that class thats why inheritance is very important in Object-Oreinted Programming Languages.
                                             As i told you before inheritance is "Define a class in term of another class" what is that mean.It mean you already created a class and you wanna create a new one class having same members and attributes so are you going to create a new one instead of using these member function and attribute that you already have? Your Code must be Compact but comprehensive. So lets discuss about Base Class & Derived Class .

Base Class:

                  A class that you already created lets Suppose you have created a class name "A"

Derived Class:

                   A class that you just derived from base class we can call this relation "IS a" relation
 because Derived class IS a part of Based class. i.e.. dog IS-A Animal, Cat is a black

Look at this Example:

"Dog is Inherited from Animal class"

Example with Program

"Addition.h"      //header file//

#include<iostream>
using namespace std;
class A{
int a;
public:
void getval_a(int);
int get_a();
};
class B:public A{
int b,c;
public:
void getval_b(int);
void add();//c=b+get_a()
void disp_val();//cout<<c;
};
void A::getval_a(int x){
a=x;
}
int A::get_a(){
return a;
}
void B::getval_b(int x){
b=x;
}
void B::add(){
c=get_a()+b;
}
void B::disp_val(){
cout<<"Value of A: "<<get_a();
cout<<"\nValue of B: "<<b<<endl;
cout<<"Sum of A & B: "<<c;
}


                     //inheritance
"Addition.cpp"

#include<iostream>
#include"addition.h"
using namespace std;
int main()
{
int a,b;
B obj;
cout<<"Enter value of A"<<endl;
cin>>a;
cout<<"Enter value of B"<<endl;
  cin>>b;
  obj.getval_a(a);
  obj.getval_b(b);
obj.add();
obj.disp_val();
}



"Main.cpp"

#include<iostream>
#include"addition.h"
using namespace std;

void A::getval_a(int x){
a=x;
}
int A::get_a(){
return a;
}
void B::getval_b(int x){
b=x;
}
void B::add(){
c=get_a()+b;
}
void B::disp_val(){
cout<<"Value of A: "<<get_a();
cout<<"\nValue of B: "<<b<<endl;
cout<<"Value of C: ";
}



















  



Wednesday, 8 July 2015

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;
}

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;
}
}

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;
}


}

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')
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\' ";
}