Skip to main content

#logicalcoding Add two Numbers. Write a program to take input from the ...

Write a program to take a number from the user and add this number to return the values.

Step-by-step becomes a logical programmer. this series is very helping full for you. I am going to introduce how to write the logic for this application and program. You have to take the values from the user and add this number it is a simple program but how you do how many cases are satisfied in this logic it is matter.

If you want this logic to watch this video.


Hi Welcome to coding part:

   I am going to introduce how to do this question in java.

Code:

//Description Addtion two number number,take from user
import java.util.Scanner;
class Addition 
{

public static float add(int a,int b){
      //Logic for addition
  float c=a+b;
      return c;
}
public static void main(String[] args) 
{
int a,b;
//Write logic for take the input form user
Scanner sc=new Scanner(System.in);
a=sc.nextInt();
b=sc.nextInt();
System.out.println(add(a,b));
}
}


Output:

Enter the two Number like that:
  100
 300
400 output

Enter the two Number:

3000
5000

8000 Output like that you can write this code.

If you have any problem with this question than you can comment in this page I will give you replay.

If you want Assignment Question then:

    Assignment Question: click hear

If you want to becom a good logical programer than join my youtube channel 

  Er prince Kumar Ojha click hare






Comments

Popular posts from this blog

Difference between Traditional programming languages and object-oriented programming languages..?

 What are Traditional programming languages and object-oriented programming languages..? or Difference between Traditional programming language  and object-oriented programming language Here....what is Traditional programming language and object-oriented programming language..? or Difference between Traditional programming language to help you make the new concepts, you are learning            as a beginner to  become a Master in any programming it's really very most important: Traditional programming language 1.Traditional computer programming has been around for more than a      century, with the first known computer program dating back to the mid-1800s.  2.Traditional Programming refers to any manually created program     that uses input data and runs on a computer to produce the output. 3.But for decades now, an advanced type of programming has revolutionized     business, particularly in ...

Top 50 HTML Interview Question (Most popular in the interview) | important html interview question

😀  Hello everyone. As you all know that to build a software project there are 3 Major categories to develop.😂 1.Front End  2.Middle Ware 3.Back End To crack the interview in front-end technology am going to give top FAQs which take place in your interview.so... Let's start now. TOPMOST FAQ's IN HTML   The first question raised by the interviewer is 1)What is HTML? HTML is a HyperText Markup Language. It is used for the creation and display of attractive, interactive, and dynamic web pages. By Tim Berners Lee's father of web environment. 2)What is the importance of Doctype in HTML? ​It is written at the top of the HTML document.​It is not a tag.​It tells the browser about the HTML version. 3)Define a TAG. ​A Tag or Element is said to be the text placed between Left angular brace " <" and right angular brace " >".   Syntax :   < .......... >    :     < html>   Do you know there are two types of ...

Miner Project | Major project for college Students | B.E, MCA, B-tech Student project in college

                        Miner Project | Major project college  Student for majors and miner project to submit the college and university. we can submit this project to final year students and third-year also?     Download project