Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
simple use of templete
// Simple use of function templete #include<iostream> using namespace std; template<typename T> T sum(T a, T b) { T result; result= a+b; return result; } int main() { int i=4,j=6,k; double f=8.345,g=879.45,h; k=sum<int>(i,j); h=sum<double>(f,g); cout<<endl<<"K= "<<k<<endl; cout<<endl<<"H= "<<h<<endl; }
run
|
edit
|
history
|
help
0
Area of a triangle using templete
Riemann's prime number formula
prime factorization trial division
Square of maximum
Tejas choudhari
For Hello World
Height of a binary tree
MinCostKStops_BFS
volatile thread-safe object
ამოცანა#2---------Point and a rectangle