115
****************** C++ PROGRAMS **************** =========================================================================== ------------------------- SIMPLE C PROGRAM ------------------------------- #include<stdio.h> #include<conio.h> void main() { float a; clrscr(); a=50; printf("the value of a is:%f",a); getch(); } ====================================================================== #include<stdio.h> #include<conio.h> void main () { clrscr (); printf("\n division operation Results " ); printf("\n two integers (5 &2) : %d ", 5/2); printf("\n one int & one float (5.5 & 2) : %g ", 5.5/2); printf("\n two integers (5 & 2) : %g ",(float)5/2); getch; } ====================================================================== ******************************* C++ PROGRAM ************************** #include<iostream.h> #include<conio.h> void main() { clrscr(); cout<<" hello india \n how r u "; cout<<"\n GOOD MORNING INDIA "; getch(); } ======================================================================= ************************** STORE VALUE IN A VARIABLE ****************** #include<iostream.h> #include<conio.h> void main() { clrscr(); int a; a=49; cout<<"value of a is : "<<a; getch(); } ====================================================================== *********** A VARIBLE STORE ONLY SINGLE VALUE AT A TIME ************** #include<iostream.h> #include<conio.h>

NOTES OF C++

Embed Size (px)

DESCRIPTION

C++ notes

Citation preview

****************** C++ PROGRAMS ****************===========================================================================------------------------- SIMPLE C PROGRAM -------------------------------#include

#include

void main()

{

float a;

clrscr();

a=50;

printf("the value of a is:%f",a);

getch();

}

======================================================================#include

#include

void main ()

{

clrscr ();

printf("\n division operation Results " );

printf("\n two integers (5 &2) : %d ", 5/2);

printf("\n one int & one float (5.5 & 2) : %g ", 5.5/2);

printf("\n two integers (5 & 2) : %g ",(float)5/2);

getch;

}

======================================================================

******************************* C++ PROGRAM **************************#include

#include

void main()

{

clrscr();

cout