18 lines
380 B
Batchfile
18 lines
380 B
Batchfile
@echo off
|
|
echo Building Fibonacci C++ program...
|
|
|
|
echo Compiling with g++...
|
|
g++ -o fibonacci.exe fibonacci.cpp
|
|
|
|
if %errorlevel% equ 0 (
|
|
echo Build successful!
|
|
echo Run with: fibonacci.exe
|
|
echo.
|
|
echo Running the program:
|
|
fibonacci.exe
|
|
) else (
|
|
echo Compile failed!
|
|
echo Make sure you have a C++ compiler installed (like MinGW or Visual Studio)
|
|
)
|
|
|
|
pause |