Programa #1
#define VALUE 10
int main() {
int i, mult_table[10];
for (i = 0; i < 10; i++) {
mult_table[i] = i * VALUE;
}
return 0;
}
|
Programa #2
#include <stdio.h>
#define VALUE 10
int main() {
int i;
for (i = 0; i < 10; i++) {
printf("%d x %d = %d\n", i, VALUE, i * VALUE);
}
return 0;
}
|
Programa #3
#include <stdio.h>
#define STRING_MAX_SIZE 100
#define PWD "MyPassword"
int main(){
char s[STRING_MAX_SIZE];
#ifdef DEBUG
printf("Write text to encrypt: ");
#endif
scanf("%s", s);
printf("crypt(%s) = %s\n", s, crypt(s, PWD));
#ifdef DEBUG
printf("Done!\n");
#endif
return 0;
}
|