Question

I have installed Dev C++ on Windows 8 and this is my first program, however it runs smoothly until I run it.

Here is my first program:

The first program

When I compile it...

Compilation

When I run it however, here arises the problem...

Error in running the program

However the Compiler Log shows this message:

Compiler: Default compiler
Executing  gcc.exe...
gcc.exe "C:\Users\Zainab\Downloads\Table.c (2).c" -o "C:\Users\Zainab\Downloads\Table.c     (2).exe"    -I"C:\Dev-Cpp\include"   -L"C:\Dev-Cpp\lib" 
gcc.exe: Internal error: Aborted (program collect2)
Please submit a full bug report.

CODE:

#include<stdio.h>

int main()
{
    int a, b, c=1;

    printf("Enter the table of:");
    scanf("%d", &a);
    printf("Enter the number of times:");
    scanf("%d", &b);

    while (c <= b) {
        printf("%d", a);
        printf("* %d", c);
        printf("= %d", a*c);

        if (c < b) {
            printf("\n");
        }

        c++;
    }

    return 0;
    getch();
}
Was it helpful?

Solution

Use better tools. Dev-C++ has been abandoned. A good free open source C++ IDE is CodeBlocks. There are others e.g. Orwell Dev-C++

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top