#include void happyBirthday(std::string name, int age); int main() { // function = a block of reusable code std::string name = "Bro"; int age = 21; happyBirthday(name, age); return 0; } void happyBirthday(std::string name, int age){ std::cout
if you write int in place of void, it means the function return integer when executed (like the main function), void means it a funtion that doesn't return anything, other datatypes can also be put here
#include
void happyBirthday(std::string name, int age);
int main()
{
// function = a block of reusable code
std::string name = "Bro";
int age = 21;
happyBirthday(name, age);
return 0;
}
void happyBirthday(std::string name, int age){
std::cout
you explained it so goood ı've never understand the functions this well thank you
tip from papa please use using namespace std;
I really like your C++ series. Keep it up. Please make more C++ Videos. So, let's defeat the UA-cam algorithm.
God bless you
incredible speed of code execution
thank you amazing video
Simple weight calculator. - Pretty efficient.
#include
void weightCalc() {
int mass ;
double weight ;
std::cout mass;
std::cout
Thank you sm🙏🏼
is any good to use functions below main?
it doenst change anything, apart from being below the main function visualy.
Thank you
احبك✋️
what is void?
no return type (does not give anything back)
if you write int in place of void, it means the function return integer when executed (like the main function), void means it a funtion that doesn't return anything, other datatypes can also be put here
finally, hello world v2.0
#include
void hello(std::string world);
int main()
{
std::string world = "Hello, World!";
hello(world);
return 0;
}
void hello(std::string world)
{
std::cout
good tiigao chan
@@rivazmardani *chan =}}}
}
void find_x(double a, double b, double c ){
double x1;
double x2;
double D = pow(b,2) - 4*a*c;
if (D>0){
x1=(-b+sqrt(D))/2*a;
x2=(-b-sqrt(D))/2*a;
std::cout
Gui in c--
#include
using namespace std;
void happyBoy(bool IsHappy, string name);
int main() {
bool IsHappy = true;
string name = "Andrew";
happyBoy(IsHappy, name);
return 0;
}
void happyBoy(bool IsHappy, string name);
cout
#include
void song(int age = 19, std::string Name = "Christian") {
std::cout