+ 3

Want a help

Im reading and trying to know the basic but im facing fear.. That i didnt get able to write cide by myself https://code.sololearn.com/c5ytOPl8DuIG/?ref=app

21st Jun 2018, 5:06 PM
Nikita Desale
Nikita Desale - avatar
11 Respostas
+ 6
Hello, Nikita ! The most important thing in programming is that you practice code, if you do not practice, you can not understand the programming process itself! To do this, you need a codeplayground from SoloLearn. Good luck!
21st Jun 2018, 5:10 PM
Alexander Sokolov
Alexander Sokolov - avatar
+ 2
With what you have problem? Show your code.
21st Jun 2018, 5:08 PM
Lstiti
+ 1
Cant understand break command in c language properly. #include <stdio.h> int main() { int num = 5; while (num > 0) { if (num == 3) break; printf("%d\n", num); num--; } return 0; }
22nd Jun 2018, 12:16 PM
Nikita Desale
Nikita Desale - avatar
21st Jun 2018, 5:13 PM
Nikita Desale
Nikita Desale - avatar
0
Want to take two value using scanner and print their addition
21st Jun 2018, 5:14 PM
Nikita Desale
Nikita Desale - avatar
0
import java.util.Scanner; class MyClass { public static void main(String[ ] args) { Scanner scan = new Scanner(System.in); System.out.println("write first number"); double a = scan.nextDouble(); System.out.println("write second number"); double b = scan.nextDouble(); double sum = a+b; System.out.println("sum = "+sum); } }
21st Jun 2018, 5:24 PM
Lstiti
0
Thank you sir. Can you tell me that how the value stored one by one
21st Jun 2018, 5:26 PM
Nikita Desale
Nikita Desale - avatar
0
Rephrase your question because I don't understand what you mean.
21st Jun 2018, 5:28 PM
Lstiti
0
Ok sir If user want to take value from user twice so user will input two values at same time or will give 1 st and then 2nd And sir why we use double.. Instead of double if we use int then
21st Jun 2018, 5:31 PM
Nikita Desale
Nikita Desale - avatar
0
Normally user will be asked twice to give numbers. But if you run code here you need to enter everything at the beginning. You can use int if you want. But than you won't be able to sum, for example, 2.5 + 2.5
21st Jun 2018, 5:42 PM
Lstiti
0
Thank you Sir. Will ask more question as beginner. :) Sorry for the inconvenience sir that you said rephrase the question
21st Jun 2018, 5:44 PM
Nikita Desale
Nikita Desale - avatar