in Uncategorized

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Javascript/Html:

<html>
<head>
<title></title>

<script type="text/javascript">

function HelloWorld()
{
   alert ("Hello World!");
}

</script>

</head>
<body>

<a href="javascript:HelloWorld()">Hello</a>

</body>
</html>

Preview:
Hello

PHP:

<?php 
 echo "Hello, World!";
?> 

C/C++:

#include <iostream.h>
using namespace std;

class example{
   int var1, var2;
   public:
   void set_request(int a, int b);
   int sum(){return (var1+var2);}
}class_obj;

void example::set_request(int a, int b)
{
    var1 = a;
    var2 = b;
}

int main(void)
{
    class_obj.set_request(1,4);
    std::cout<<"\n The sum is "<<class_obj.sum()<<"\n";

    return 0;
}

Write a Comment

Comment