C Program for Sum of First N Natural Numbers

The program adds first N natural numbers (starts from 1) and prints the sum in the console. We wrote this program using Dev C++ version on a Windows 7 64-bit system.  You may try other standard C compilers to run the program with modifications. Learn following c programming concepts before you attempt this example … Read more

JavaScript Arithmetic Operators

The arthemetic operators are those that use two or more operands in the form of constants or variables and return single value as results. The value of arithmetic expressions are stored in a variable or used in other expressions. There are 6 arithmetic operators in JavaScript language. These are: Addition Subtraction Multiplication Division Remainder Exponential … Read more

JavaScript-Exercise 09- For Loop

Previous Next The “For Loop” is the most popular loop in many popular programming languages. Like any other loop, it’s task is to repeat a given statement inside the loop until the given condition in the loop becomes false. It’s easier to understand with an example. In the following example web page we have a … Read more

Basic JavaScript – Exercise 08: Alerts, Confirm and Prompt

Previous Next JavaScript pop-up boxes are very important part of web applications. JavaScript programming allows 3 types of pop-up boxes or dialog boxes. Alert boxes Confirm boxes Prompts Alert Boxes Alert boxes give immediate feedback to the user. There are many reasons to provide an alert message to users. To give them some information Give … Read more

JavaScript – Exercise 07: Switch – Case Statements

Previous Next In the previous post, you learned that the conditional statements can change the direction or flow of the program. One type of conditional statement use if-else structure. Another type of conditional statement is called the switch-case statement. A user input the choice from a given set of options and switch receives the input. … Read more

JavaScript – Exercise 04 -External JavaScript Files

Previous Next There are many ways to insert JavaScript into an HTML document. One way is to add the script directly to the HTML document.This method is called adding an “Inline script”. You can add an inline script at any place within an HTML document, but most web developers like to place the scripts in … Read more

Theory of Computation: alphabet and languages

What is this subject called Theory of Computation?  It is one of most important topic of computer science. It involves heavy use of mathematics.  What is taught in the subject ?   computer uses algorithms than receive input and produce precise output. The algorithm themselves are nothing but mathematical functions. These functions receives inputs and … Read more

Finite Automata – I

Formally, “Finite automation is mathematical model of a system with discrete inputs and outputs”. Finite automata describe a system or computer that goes through a fix number of states and has fixed inputs. For people new to the topic, it is easier to understand using an example. States and Symbol In this simple example, P … Read more

Steps In Data Cleaning

In the previous article, you have learned about dirty data and issues with data cleaning. Keeping that in mind, we introduce steps in data cleaning. The data cleaning steps involve data analysis , creating and applying transformation rules, and back-flow. Step 1: Data Analysis Before you clean the data, you must analyze it using the … Read more

JavaScript References

In this document you will find JavaScript references for all object classes. String Functions JS: repeat() JS: endsWith() JS: split() JS: substring() JS: toUpperCase() JS: toLowerCase() JS: indexOf() JS: lastIndexOf() JS: join() Array Functions JS: push() JS: pop() JS: unshift() JS: shift() JS: slice() JS: splice()