I Got My Code Up And Running The Way I Want, Only Thing I Want To Know Is How Do I Make The Counter Count TO The Number Imputed Instead Of Counting FROM The Number??? Basically I Want A Countup Not A Countdown. Here Is My Code
#include <iostream>
using namespace std;
int main ()
{
int n,mod_test;
cout << "Enter the ending number > ";
cin >> n;
cout << "\n";
while (n>0)
{
{
mod_test = n%10;
if (mod_test==0 || n==11 || n==12 || n==13)
{
cout << n << "th hello \n ";
}
else if (mod_test==2)
{
cout << n << "nd hello \n ";
}
else if(mod_test==1)
{
cout << n << "st hello \n ";
}
else if (mod_test==3)
{
cout << n << "rd hello \n ";
}
else
{
cout << n << "th hello \n ";
}
n--;
}
}
system("pause");
return 0;
}
// Count Up.cpp : main project file.
#include <iostream>
usingnamespace std;
int main ()
{
int n=0,mod_test, x=1; // x is used to check when n is reached
cout << "Enter the ending number > ";
cin >> n;
cout << "\n ";
do
{
mod_test = x%10;
if (x<10)
cout << " "; // Add a space when x < 10 just to keep text aligned on screen
if (x<100)
cout << " "; // Add another space while x < 100 just to keep the text aligned
if ((mod_test >= 4 && mod_test <= 9) || mod_test==0 || (x>=4&&x<=20))
{
cout << x << "th hello \n ";
}
elseif (mod_test==3)
{
cout << x << "rd hello \n ";
}
elseif(mod_test==2)
{
cout << x << "nd hello \n ";
}
elseif (mod_test==1)
{
cout << x << "st hello \n ";
}
x++;
}while (x!=n+1);
system("pause");
return 0;
}