I am programing a calendar to much time but i cant realize that the compiler can translate these, i dont know i am making bad, i put the code and the dev c++ compile errors catched :
[code.]
#include <stdio.h>
int algoritmozeller (int anno, int mes, int i ) {
int w,y,h;
if(mes<=2) {
mes = mes + 12;
anno = anno - 1;
}
else {
mes = mes - 2;
}
y = anno % 100;
w = anno / 100;
h = (( 700 + (( 26 * mes - 2)/10) + i + y + (y/4) + (w/4) + 5 * w) % 7);
return (h);
}
void calendariodibujo(int primerdia, int n, int k) {
if(primerdia == 1) {
k = 1;
printf(" %d",k );
for(int i = 2; i<= 7; i++) {
...\main.cpp||In function 'int main()':|
...
...\main.cpp|758|warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat]|
...
...\main.cpp|761|warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat]|
...\main.cpp|769|error: 'n' was not declared in this scope|
...\main.cpp|774|error: 'bisiesto' was not declared in this scope|
...\main.cpp|776|error: 'n' was not declared in this scope|
...\main.cpp|780|error: 'bisiesto' was not declared in this scope|
...\main.cpp|783|error: 'n' was not declared in this scope|
...\main.cpp|790|error: 'n' was not declared in this scope|
...\main.cpp|795|error: 'n' was not declared in this scope|
...\main.cpp|800|error: 'n' was not declared in this scope|
...\main.cpp|805|error: 'n' was not declared in this scope|
...\main.cpp|811|error: 'n' was not declared in this scope|
...\main.cpp|816|error: 'n' was not declared in this scope|
...\main.cpp|821|error: 'n' was not declared in this scope|
...\main.cpp|825|error: 'n' was not declared in this scope|
...\main.cpp|829|error: 'n' was not declared in this scope|
...\main.cpp|833|error: 'n' was not declared in this scope|
...\main.cpp|842|error: 'k' was not declared in this scope|
...\main.cpp|842|error: 'n' was not declared in this scope|
||=== Build finished: 17 errors, 2 warnings (0 minutes, 0 seconds) ===|
Your error lines won't match, because I attempted to clean up your 1004 lines of code for 15 minutes before conceding.
May have been the websites posting format at fault, but you really ought to learn how to properly post code on this site if you plan to use it.
Add to your main function:
int n,k;
Add '}' to the end of your main loop.
And I have no idea how your bisiesto variable is suppose to behave but it's apparently a bool or (int/char)condition of some sort.
your code is not easy to read.....
make it simple .. you can use functions in it to make it smaller.... or just test it once before going in 2nd step....