Questions tagged [decimal-point]

The character or glyph used to separate the integer part from the fraction part in a decimal number. Usually either a dot or a comma.

378 questions
-3
votes
1 answer

How to convert 2 numbers to 2 parts of a decimal number [C#]

Im trying to convert 2 user inputed numbers (for example): double number = 5; double number2 = 23; into this: decimalnumber = 5.23;
-3
votes
1 answer

Why cant I enter a number with decimal point in scanf? in C

I'm writing a simple C program to classfiy distances into certain ranges such as short long or medium I understand that C will cancel out numbers after the decimal point to store as an int. So that confuses me that why can't I type in a number such…
LCS
  • 3
  • 4
-4
votes
2 answers

How to calculate number of digits before and after decimal point?

Today a question was asked in my c++ class test. "Write a program that inputs a floating point number and calculates the number of digits before and after decimal point." I calculated numbers before decimal points with this code: float…
Nafees Anwar
  • 5,263
  • 2
  • 19
  • 32
1 2 3
25
26