Even or Odd?

There are many ways to determine wheter the number is odd or even. Here is two: 1. Check with modulus operator (%) The modulus operator returns the remainder when dividing two numbers. Even numbers doesn’t have a remainder, but Odd numbers have 1. 2. Check by bit operators Here is the code: 1. With modulus operator (%) ———————————- #include int main() { int number; printf(“Input integer\n”); scanf(“%d”,&number); if(number % 2 == 0) { printf(“Even\n”); } else { printf(“Odd\n”); } return 0; } ———————————- 2. Check by bit operator ———————————- #include

Continue readingEven or Odd?

Exec PHP

This article is for wordpress.org users. Exec-PHP is the best plugin i ever use. Just download from http://bluesome.net/post/2005/08/18/50/. Exec-PHP enable you to run PHP and script from your blog. It’s easy to install, just follow the note. If you’re PHP programmer and want to enhance your blog, it’s recommended to install this plugin to your wordpress blog. Technically Exec-PHP executes code inside of arbitrary text by wrapping the whole text into “? > < ?” php tags and hand it over to the PHP eval() function. This requires that the

Continue readingExec PHP

Two Dimensional Array

This article demonstrate how to passing parameter of two dimensional array (C++ languange); Artikel ini menjelaskan bagaimana melakukan passing parameter untuk array 2 dimensi (bahasa C++); // Author: Yohan Naftali // Prototype void myFunction(long double (*myArray)[noRow]); //Global Variable const int NoRow = 10; const int NoCol = 10; //for array 10×10 void main()