Hi
So I recently started to program with C again. That's why i called this one "FirstProgram"
(I do not have a lot of experience, so please forgive huge mistakes)
I think there is a problem with my editor or compiler (Code::Blocks)
Here's the code with which I first noticed that something is wrong..
(There also may be some mistakes in there, please correct me if so.)
Code:
#include <stdio.h>
int anzahl
int main()
{
printf ("Number of Integers: ");
scanf ("%d", anzahl);
int Numbers[anzahl];
for (i = 1; i = anzahl; i++)
{
printf ("%d. Number: ", i);
scanf ("%d", Numbers[i-1]);
}
for (i = 1; i = anzahl; i++)
{
printf ("\n\n%d.Number", i);
}
}
If I start this program ("Run" or "Build" and afterwards "Run"), I immediately get the Output which I attached.
I thought it was strange that I wasn't asked for entering a number, so I tried to change the code to something like that
Code:
#include <stdio.h>
// int anzahl
int main()
{
// printf ("Number of Integers: ");
// scanf ("%d", anzahl);
// int Numbers[anzahl];
// for (i = 1; i = anzahl; i++)
{
// printf ("%d. Number: ", i);
// scanf ("%d", Numbers[i-1]);
}
// for (i = 1; i = anzahl; i++)
{
// printf ("\n\n%d.Number", i);
}
printf ("Hello");
return 0;
}
(I took away almost everthing and wrote "printf ("Hello");" and a return)
If I now do "Run" or "Build" and "Run", I get the same Output as last time...
I don't get it... Maybe I just don't know how to work with Code::Blocks
Please somebody help me...