+ 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
11 RĂ©ponses
+ 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!
+ 2
With what you have problem? Show your code.
+ 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;
}
0
Want to take two value using scanner and print their addition
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);
}
}
0
Thank you sir.
Can you tell me that how the value stored one by one
0
Rephrase your question because I don't understand what you mean.
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
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
0
Thank you Sir.
Will ask more question as beginner. :)
Sorry for the inconvenience sir that you said rephrase the question