Learn Geek languages like Big data,Hadoop,Hive,Pig,Sqoop ,flume,Cassandra,Hbase,Ruby On Rails,Python,Java and many more.

Friday 23 June 2017

Programs related Functions In C++


CODE

#include <iostream>
using namespace std;

int addition (int a, int b)
{
  int r;
  r=a+b;
  return r;
}

int main ()
{
  int z;
  z = addition (5,3);
  cout << "The result is " << z;
}


Output:

The result is 8

CODE:

#include <iostream>
using namespace std;

void printmessage ()
{
  cout << "I'm a function!";
}

int main ()
{
  printmessage ();
}

Output:

I'm a Function!

4 comments:

  1. Positive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. fake diplomas

    ReplyDelete
  2. After they validate their e mail deal with, they then obtain a second electronic mail that gives them a website link to the Short article Remarks page along with the password to unlock it. They can be then no charge to comment around the web site. python programming blog

    ReplyDelete

if you have any query regarding geek languages,
email on arora.ratul@gmail.com