This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i=1;i<=10;i++) | |
{ | |
s = "" | |
for(var j=1;j<=10;j++) | |
{ | |
s += i*j+"\t" | |
} | |
console.log(s) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created on : 19 March 2017. | |
* aim : To print table of numbers in range [1,10]. | |
* coded by : Rishikesh Agrawani. | |
*/ | |
class Main | |
{ | |
public static void main(String[] cmdArgs) | |
{ | |
//Outer for loop take cares of number of rows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created on : 19 March 2017. | |
* aim : To create a rectangle using * characters having 5 rows and 10 columns. | |
* coded by : Rishikesh Agrawani. | |
*/ | |
class Main | |
{ | |
public static void main(String[] cmdArgs) | |
{ | |
//Outer for loop take cares of number of rows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created on : 19 March 2017. | |
* aim : To create a triangle using * characters. | |
* note : The number of columns and rows will be same here for creating a better triangle,let's make it 10. | |
* coded by : Rishikesh Agrawani. | |
*/ | |
class Main | |
{ | |
public static void main(String[] cmdArgs) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created on : 19 March 2017. | |
* aim : To create a triangle using * characters. | |
* note : The number of columns and rows will be same here for creating a better triangle,let's make it 10. | |
* coded by : Rishikesh Agrawani. | |
*/ | |
class Main | |
{ | |
public static void main(String[] cmdArgs) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created on : 20 March 2017. | |
* aim : To create a triangle using * characters(Right shifted). | |
* note : The number of columns and rows will be same here for creating a better triangle,let's make it 10. | |
* coded by : Rishikesh Agrawani. | |
*/ | |
class Main | |
{ | |
public static void main(String[] cmdArgs) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created on : 20 March 2017. | |
* aim : To create a triangle using * characters(Right shifted). | |
* note : The number of columns and rows will be same here for creating a better triangle,let's make it 10. | |
* coded by : Rishikesh Agrawani. | |
*/ | |
class Main | |
{ | |
public static void main(String[] cmdArgs) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
date of creation : 20 march 2017. | |
aim of program : Using vector container in C++. | |
coded by : Rishikesh Agrawani. | |
Note : 1. begin(), end(), size(), push_back() are the functions used here. | |
2. If we will access the out of range index then we will get 0. | |
3. ++itr & itr++ both can be used while iterating through the list of items in vector. | |
4. If vector has 10 elements and if we try to access the expressions like floatVect[10], floatVect[15] then we'll get 0. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created on : 22 March 2017. | |
* aim : To use for-each loop in java. | |
* coded by : Rishikesh Agrawani. | |
* note : It is used to iterate over an array or collection.While iterating over a String, we need to convert the String into an array of characters. | |
*/ | |
import java.util.ArrayList; | |
class Main | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created on : 23 March 2017. | |
* aim : To reverse the contents of a string without using any predefined methods. | |
* coded by : Rishikesh Agrawani. | |
*/ | |
class Main | |
{ | |
public static void main(String[] cmdArgs) | |
{ |