Multiplication Table using Python program
Tutorial Land
by
4y ago
              Hello, In this blog we see the Python code to print multiplication table. In this program user give the input and depends on that integer number the multiplication table will displayed. Code:num = int(input("Display multiplication table of? ")) for i in range(1, 11):    print(num, 'x', i, '=', num*i) In the above code we use the range function. So easily we compact the code as compare to c, c++, java. In last print line all the operations are taken in one line and the output is displayed to the user. Output: Display multiplication table of? 12 12 x 1 = 12 12 x 2 = 24 12 ..read more
Visit website
Multiplication Table using C++ program
Tutorial Land
by
4y ago
C++ program to print Multiplication Table                     Hello, In this blog we see the c++ program code to print multiplication table. In this program user give the input and depends on that integer number the multiplication table will displayed. Code: #include<iostream.h> #include<conio.h> void main() {  int s;  clrscr();     cout<<"Enter the number to print the multiplication table: ";     cin>>s;     cout<<"\n";  for(int i=1; i <= 10; i++)  {      cout<<s;      cout<<" * ";      cout<<i;      cout<< ..read more
Visit website
Multiplication Table using C program
Tutorial Land
by
4y ago
C program to print Multiplication Table                     Hello, In this blog we see the c program code to print multiplication table. In this program user give the input and depends on that integer number the multiplication table will displayed. Code: #include<stdio.h> #include<conio.h> void main() {  int s,i,a;  clrscr();     printf("Enter the number to print the multiplication table: ");     scanf("%d",&s);     printf("\n");  for(i=1; i <= 10; i++)  {      printf("%d",s);      printf(" * ");      printf("%d",i);      a=s*i;      printf("=%d",a);      printf ..read more
Visit website
Multiplication Table using Java program
Tutorial Land
by
4y ago
import java.util.Scanner; public class MultiTable1 {     public static void main(String[] args)     {         Scanner s = new Scanner(System.in);  System.out.print("Enter number:");         int n=s.nextInt();         for(int i=1; i <= 10; i++)         {             System.out.println(n+" * "+i+" = "+n*i ..read more
Visit website
Fibonacci series using Java program
Tutorial Land
by
4y ago
                     Hello friends, In this blog we see the how to generate Fibonacci series using java. In C, CPP and Python programs we see what is Fibonacci series. So Without giving the definition of Fibonacci series we see the program. Program: 1. (Using for loop) public class Fibonacci {     public static void main(String[] args) {         int a = 0, b = 1;         System.out.println("First 10 terms: ");         for (int i = 1; i <= 10; ++i)         {             System.out.println(a + "  ");             int sum = a + b;             a = b;             b = sum ..read more
Visit website
Cpp language code to print fibonacci series
Tutorial Land
by
4y ago
CPP LANGUAGE CODE TO PRINT FIBONACCI SERIES Introduction                                                 Fibonacci series means if we are giving input as 7 then the output is 0  1  1  2  3  5. Means in output first digit is 0 then second is 1, addition of first and second digit is third digit i.e.0+1=1, next is 1+1=2, then 2+1=3, then 3+2=5.                     The next digit is 5+3=8 but 8 is greater than 7(8>7) i.e.(8!<7) so the control is transfer to the out of the loop.The actual code is as follows: code: #include<iostream.h> #include<conio.h> void main ..read more
Visit website
Arithematic operators Program
Tutorial Land
by
4y ago
Simple program for performing Arithmetic operation First we see what does Arithmetic Operator mean?         Arithmetic operator is a mathematical function  that takes two inputs and performs a calculation on them. They are used in common arithmetic and most computer languages contain a set of such operators that can be used within equations to perform a number of types of sequential calculation. Basic arithmetic operators include: Addition (+): It displays the addition of two numbers. Eg. 4+6=10 Subtraction (-):It performs the subtraction of two numbers. Eg.5-2=3 Multiplication ..read more
Visit website
Reverse String
Tutorial Land
by
4y ago
Java Program to print the Reverse String In this blog we the java program to reverse the given string. To reverse the given string we use two variables i.e. original, reverse and reverse a string is initialized as null. Then by using a scanner, we scan the input string. This input string is stored in the original variable. Then by using length function and for loop program will reverse the string and finally stored in the reverse string. The actual code is as follows. Code: import java.util.*; class ReverseString { public static void main(String args ..read more
Visit website
Java Half Pyramid Pattern
Tutorial Land
by
4y ago
Java Program to Print half inverted Pyramid        Hello friends, In this post, we see the simple java code to print the above pattern. To print the pattern we use 2 for loop, first for rows and second for columns.         We initialize two variables i.e. i and j as an integer, i for Row and j for column. The difference between the keyword print and println is, print is use to print the data/statement, as well as the second data/statement is print in front of first line. For example, Code: class print_printlnDemo { public static void main(String args[]) { System.out.print("Java "); Sy ..read more
Visit website
Simple Java Program
Tutorial Land
by
4y ago
Java Programming                        Hello friends, In this blog we see how to run the Java program. It is very simple to run the java program. For, to run the java code your machine must have a JDK (Java Development KIT) file. When you install it on your pc one folder named as Java is created in c drive. So first of all we see the simple java program to display "Hello I am Java Programmer". I will explain each and every stapes of program. Program: class intro { public static void main(String args[]) { System.out.println("Hello I am Java Programmer"); } }                        To ..read more
Visit website

Follow Tutorial Land on FeedSpot

Continue with Google
Continue with Apple
OR