Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Getting Started With C++ [Solved]

Getting Started With C++ [Solved]

Posts 1–7 of 7 · Page 1 of 1
CE
Cehk!
Getting Started With C++ [Solved]
Alright so im just starting C++ and im reading C++ without fear the second edition and i just really needed some basic help with understanding what do i have to do to print all the numbers from n1 to n2 where n1 and n2 are two numbers specified by the user. Im using the program dev-c++ as my compiler. Thanks
#1 · 14y ago
25
258456
Well, you will first need to define n1 and n2 as an int variable sinice they will be integers:

int n1, n2;


Then you will use the cin function to get user input:

std::cin>>n1;
std::cin>>n2;

Then you will want to print it, so you use the cout function:

std:: cout<<"First number is: "<<n1<<"\nSecond number is: "<<n2;


Keep us posted on your progress.
#2 · 14y ago
Hassan
Hassan
Quote Originally Posted by 258456 View Post
Well, you will first need to define n1 and n2 as an int variable sinice they will be integers:

int n1, n2;


Then you will use the cin function to get user input:

std::cin>>n1;
std::cin>>n2;

Then you will want to print it, so you use the cout function:

std:: cout<<"First number is: "<<n1<<"\nSecond number is: "<<n2;


Keep us posted on your progress.
He wants to print all the numbers in the range of n1 and n2 (inclusive).

Code:
#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
int n1,n2;
cout << "Enter 1st Number: ";
cin >> n1;
cout << "Enter 2nd Number: ";
cin >> n2;
for(int x = n1;x<=n2;x++) //Initialize x to the number stored in n1. Then loop while x is less than or equal to the number stored in n2. (x++ increments the value of x after each iteration.
{
cout << "Number is: " << x << endl;
}
_getch();
}
#3 · 14y ago
25
258456
Quote Originally Posted by Hassan View Post


He wants to print all the numbers in the range of n1 and n2 (inclusive).

Code:
#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
int n1,n2;
cout << "Enter 1st Number: ";
cin >> n1;
cout << "Enter 2nd Number: ";
cin >> n2;
for(int x = n1;x<=n2;x++) //Initialize x to the number stored in n1. Then loop while x is less than or equal to the number stored in n2. (x++ increments the value of x after each iteration.
{
cout << "Number is: " << x << endl;
}
_getch();
}
Oops, my bad, i misread his post.
#4 · 14y ago
CE
Cehk!
Thanks for the help!
#5 · 14y ago
Hassan
Hassan
Np. Marked Solved.
#6 · 14y ago
brandonl90
brandonl90
I was interested in making a Kill/Death Ratio Hack for Modern Warfare 3 can anyone help me get started? I just started to read some C++ books and i really need some professional help.

Thank you
#7 · 14y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • Getting Started With Visual C++/CLIBy Hassan in Programming Tutorials
    44Last post 5y ago
  • Getting Started With Visual Applications [Solved]By xyddragon in C++/C Programming
    4Last post 14y ago
  • [Tutorial] Getting Started With a On Screen KeyBoardBy CoderNever in Visual Basic Programming
    11Last post 16y ago
  • Getting started with Uniform Spatial Subdivision.By bubblesppf in C++/C Programming
    0Last post 15y ago
  • Getting started with Mw 2 MPGHBy lolbie in Call of Duty Modern Warfare 2 Private Servers
    27Last post 16y ago

Tags for this Thread

None