'; (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

 Programs : 

Sum of two numbers

// You are using GCC

#include<iostream>

using namespace std;

void display()

{

    int a,b;

    cin>>a;

    cin>>b;

    cout<<a+b;

}

int main()

{

    display();

}


# You are using Python

x=input()

print("value of x is",x);

print("value of x is {:.2f}".format(float(input())))

x=x+","+input()

print("value of x and y is",x)

No comments:

Post a Comment