Course Solutions Uncategorized (Solved) : C Visual Studios Basically Need Space Number Reversed Even Odd Digits Lines Command Prompt Q26196189 . . . .

(Solved) : C Visual Studios Basically Need Space Number Reversed Even Odd Digits Lines Command Prompt Q26196189 . . . .

 

C++, Visual Studios,

So, basically, i need to space the number reversed, even and odddigits lines in the command prompt. So instead of showing “5421”, ineed to show it as “5 4 2 1”. Any and all help will beappreciated.

Code:

#include <iostream>

#include <fstream>

#include <string>

using namespace std;

int main()

{

string str1;

int userNumber = 0;

int counter = 0;

int strLength = 0;

char nextChar;

int reversedNumber = 0;

int remainder;

int even = 0;

int odd = 0;

string continu = “y”;

ofstream myfile;

myfile.open(“outDataFile.txt”);

while (continu == “y” || continu == “Y”)

{

cout << “Enter an integer and press <ENTER>”<< endl;

getline(cin, str1);

strLength = str1.length();

while (counter < strLength || strLength == 0)

{

if (!isdigit(str1[counter]))

{

cout << “that is not

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post