// passing parameters by reference
#include <iostream>
using namespace std;
void duplicate (int& a, int& b, int& c)
{
a*=2;
b*=2;
c*=2;
}
Type: Posts; User: sway1
// passing parameters by reference
#include <iostream>
using namespace std;
void duplicate (int& a, int& b, int& c)
{
a*=2;
b*=2;
c*=2;
}
awesome thanks for the help
by that I mean something that corrects minor syntax errors, such as indentation etc.
im using it right now(2008 express), but i hate being on windows.
#include <iostream>
using namespace std;
int main()
{
int ggg;
cout <<"enter a number\n";
cin>>ggg;
cin.ignore();
if (ggg == 776 && 777){
cout <<"you entered 776 or 777";
woops, thanks! that worked haha.
#include <iostream>
using namespace std;
int main()
{
int val;
cout<<"enter a number 1-10";
cin>> val;
cin.ignore();
if ( val != 5 ) {
cout<<"wrong/n";