'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();

OOPS PRACTICE TEST 2

 PROGRAM:

#include<iostream>

using namespace std;


void display();

void display()

{

    int a,b;

    cin >> a;

    cin >> b;

    cout << a+b;

}

int main()

{

    

    display();

    return 0;

}


PROGRAM:

#include<iostream>

#include<stdio.h>

using namespace std;


int main()

{

    int x,y;

    float f;

    cin >> x;

    cin >> f;

    cin >> y;

    cout << "value of x is " << x << endl;

    printf("value of x is %.2f\n",f);

    

    cout << "value of x and y is " << x << ","<< y  <<endl;

}

No comments:

Post a Comment