Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <conio.h>
- // Function prototypes:
- int main();
- int multi(int, int);
- // Global variables:
- int i=0;
- int c=0;
- int main()
- {
- // Clears console (might not work with Visual Studio 2010, but okay with Code::Blocks)
- system("cls");
- //printf("Multiplying not using a look-up table:\n");
- // Loop:
- for(i=0; i<13; i=i+1)
- {
- // Nested loop:
- for(c=0; c<13; c=c+1)
- {
- printf("%d x %d = %d\n",i,c,multi(i,c));
- }
- }
- return 0;
- }
- // Returns multiplied values:
- int multi(int x, int y)
- {
- return x*y;
- }
- // Donkeysoft MMXII
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement