Comment<span> (computer programming) ... In computer programming, a </span>comment<span> is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.</span>
If you’re asking what I think your saying I know comcast does
The answer is bash
. The bash command opens a Bourne-again sheel (bash) session. It is the standard shell used in most Linux computers and it uses commands similar to a UNIX shell. Bash includes features such as:
1) Command completion when pressing the tab key.
2) Command history.
3) Improved arithmetic functions.
Answer / Explanation:
#include <iostream>
using namespace std;
int main()
{
int userNum = 0;
userNum = 20;
cout << userNum << " ";
while (userNum > 1)
{
userNum = userNum/2;
cout << userNum << " ";
}
cout << endl;
return 0;
}
However, we should note that the above codes divides properly but when it gets to 0, it will always give output as 0 instead of terminating the program.
Hence to make it terminate, we include:
while (userNum > 1)
{
cout << userNum << " ";
userNum = userNum/2;
}
The above code alternatively should be replaced with int userNum = 0; .
Also, for the sake of industry best standard and the general principle, we can say:
The general principle is:
while ( <conditional> )
{
// Use the data
// Change the data as the last operation in the loop.
}
A for loop provides natural placeholders for these.
for ( <initialize data>; <conditional>; <update data for next iteration> )
{
// Use the data
}
If you were to switch to using a for loop, which I recommend, your code would be:
for ( userNum = 20; userNum > 0; userNum /= 2 )
{
cout << userNum << " ";
Convert a fraction to a decimal value using the fraction to decimal calculator by entering your fraction below. Use the “/” symbol for the fraction bar. To convert a decimal to a fraction, use our decimal to fraction calculator. Check out our fraction to percent calculator to convert fractions to a percentage.