Answer the question
In order to leave comments, you need to log in
Why does it output 0?
#include <iostream>
#include "header.h"
using namespace std;
int main()
{
setlocale(LC_ALL, "russian");
int digit = 0;
cout << NumNewline(digit);
return 0;
}
int NumNewline(int num)
{
cout << "Введите число: ";
cin >> num;
while (num)
{
cout << num % 10 << endl;
num /= 10;
}
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question