def x():
return 1, 2, 3, 4
a, b, c, d = x()
print(a, b, c, d) # 1 2 3 4
def operate(a, b):
sum = a + b
diff = a - b
mul = a * b
div = a / b
return sum, diff, mul, div
def test_list():
return ['abc', 100]
result = test_list()
print(result)
print(type(result))
# ['abc', 100]
# <class 'list'>
def name():
return "John","Armin"
# print the tuple with the returned values
print(name())
# get the individual items
name_1, name_2 = name()
print(name_1, name_2)
a, b = test()
print(a)
# abc
print(b)
# 100
#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 <<"
";
}