Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scrolling Output That Exceeds Screen Size
#17
Example for Tim in C.

As an example, I wrote the program with the formatted output in "C", the vertical output is difficult in "C" because it doesn't know Locate

Code: (Select All)

//Formatierte Ausgabe, Basic Programm - 10. April 2024

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
int eingabe;

system("cls");
printf("\nThis program will count to 100 from the number you supply.");
printf("\nEnter the number to start counting from > ");
scanf("%d", &eingabe);
printf("\n");

for(int i = eingabe; i <= 100; i++)
{
printf("%4d", i);
if((i % 20) == 0)
printf("\n");
}
return(0);
}

[Image: C-Formatierte-Ausgabe2024-04-10.jpg]

If you want to try it yourself:
1. Download and install MinGW; latest 13.2.0
MinGW 13

2. Get editor:
Notepad

3. Compile (File: formatierte-ausgabe.c)
gcc -o formatierte-ausgabe formatierte-ausgabe.c

4. If everything works, enter in Powershell: ./formatierte-ausgabe
(the "./" is not necessary in the command line)

The world belongs to the brave! (Or so  Tongue )
Reply


Messages In This Thread
RE: Scrolling Output That Exceeds Screen Size - by Kernelpanic - 04-10-2024, 04:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Font Size in Threads Dimster 5 376 12-12-2025, 04:49 PM
Last Post: Dimster
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 11 1,082 11-10-2025, 07:23 PM
Last Post: madscijr
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 0 227 10-26-2025, 06:58 PM
Last Post: madscijr
  Make IDE $Console:Only output readably large dakra137 1 540 10-10-2025, 12:21 PM
Last Post: hsiangch_ong
  Inputting output from other languages Helium5793 8 1,314 05-30-2025, 12:30 PM
Last Post: Helium5793

Forum Jump:


Users browsing this thread: 2 Guest(s)