0
C++ output ont coming
Output should be come: 2 4 a := 2 b:= 4 a:= 4 b: =2 https://code.sololearn.com/c1CO62vGzWmf/?ref=app
3 odpowiedzi
0
#include<iostream>
#include<cstdio>
using namespace std; // make the std built-in symbols active, instead of std::cin, std::cout, etc.
void swap(float &x ,float &y)
{
float t=x;
x=y;
y=t;
}
int main() // cpp standard, instead of "void main" in c standard
{
void swap(float &,float &);
float a,b;
cin>>a>>b;
cout<<"a:="<<a<<"b:="<<b<<endl;
swap(a,b);
cout<<"a:="<<a<<"b:="<<b<<endl;
return 0; // must return an int
}