Search
 
SCRIPT & CODE EXAMPLE
 

CPP

accepting multiple values from a function in cpp

#include<iostream>
using namespace std;
void div(int a, int b, int "ient, int &remainder) {
   quotient = a / b;
   remainder = a % b;
}
main() {
   int a = 76, b = 10;
   int q, r;
   div(a, b, q, r);
   cout << "Quotient is: "<< q <<"
Remainder is: "<< r <<"
";
}
Comment

accepting multiple values from a function in cpp

#include<iostream>
using namespace std;
void div(int a, int b, int &quotient, int &remainder) {
   quotient = a / b;
   remainder = a % b;
}
main() {
   int a = 76, b = 10;
   int q, r;
   div(a, b, q, r);
   cout << "Quotient is: "<< q <<"
Remainder is: "<< r <<"
";
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: The smallest element from three 
Cpp :: export gcc g++ 
Cpp :: how to writte comment in c++ 
Cpp :: nodeafternode 
Cpp :: swift functions from cpp 
Cpp :: c++ start thread later 
Cpp :: c++ map access 
Cpp :: c++ copy with transform 
Cpp :: algorithm map values 
Cpp :: can you use rand to read in from an external file inc++ 
Cpp :: c++ to c converter online 
Cpp :: ex: java script 
Cpp :: convert char to C 
Cpp :: Define and show the implementation of the functions of an arrayList. 
Cpp :: simplest code for stack implementation in c++ 
Cpp :: how to make a substring after certain position 
Cpp :: In-range Adder 
Cpp :: how to define global array in c++ in a scope 
Cpp :: The iostream is the head er file which contains all the functions of program like cout, cin and etc. 
Cpp :: pum game in c++ 
Cpp :: frc limelight tracking 
Cpp :: c++ rainbow text 
Cpp :: c++ suare 
Cpp :: scope resolution operator in c++ 
Cpp :: Determine if map contains a value for a key c++ 
Cpp :: inpout in Array c++ 
Cpp :: c++ press any key 
Cpp :: memsert 
C :: java.lang.SecurityException: Permission denied (missing INTERNET permission?) 
C :: vscode arduino [Warning] Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README. 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =