Creating file test.cpp
This commit is contained in:
parent
aa93dba62f
commit
5b8a014013
|
@ -0,0 +1,20 @@
|
|||
#include <iostream>
|
||||
|
||||
int add(int a, int b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
void greet(const std::string& name) {
|
||||
std::cout << "Hello, " << name << "!" << std::endl;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int x = 5;
|
||||
int y = 10;
|
||||
int result = add(x, y);
|
||||
|
||||
greet("World");
|
||||
|
||||
std::cout << "Result: " << result << std::endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue