c++ programs 2015

  • Upload
    deepi

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

  • 7/23/2019 c++ programs 2015

    1/6

    MANIPULATORS:Endl Manipulator:#include#includevoid main(){

    cout

  • 7/23/2019 c++ programs 2015

    2/6

    cin>>hei9ht>>ei9ht;void de/ived dis!la0t(){cout

  • 7/23/2019 c++ programs 2015

    3/6

    {cout/ollno;void student !utno()

    {cout

  • 7/23/2019 c++ programs 2015

    4/6

    cout

  • 7/23/2019 c++ programs 2015

    5/6

    void main(){sim!le s;s.9etdata();s.!utdata();

    OUTPUT:Const/ucto/ o= class sim!leEnte/ values =o/ a ? + &

    Ghe to inte9e/s & Ghe sum o= the va/ia+les Rest/ucto/ o= class sim!le

    'E%AULT ONSTRUTOR:#includeclass inte9e/{

    :/ivateint m%n;!u+licinte9e/ ();void dis!la();;inte9e/ inte9e/(){m$*;n$ *;void inte9e/ dis!la(){cout

  • 7/23/2019 c++ programs 2015

    6/6

    e"am!le o+Iect(*%&*);e"am!le o+Iect&$o+Iect;o+Iect.dis!la();o+Iect&.dis!la();/etu/n *;

    OUTPUT:Mm const/ucto/Talues * &*Talues * &*

    '$NAMI ONSTRUTOR:

    #include #include class Account{private:

    int account_no;int balance;public :

    Account(int a,int b){account_no=a;balance=b;void displa!(){cout