Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- void wypisz()
- {
- int i;
- for(i=0;i<5;i++)
- {
- if(l1[i]*l2[i]==w[i])
- {
- printf("%d * %d = %d DOBRZE!",l1[i],l2[i],w[i]);
- }
- }
- }
- int main()
- {
- int l1[5];
- int l2[5];
- int w[5];
- int i;
- for(i=0;i<5;i++)
- {
- srand(time(NULL));
- l1[i]=(rand()%100)+1;
- l2[i]=(rand()%100)+1;
- printf("%d * %d = \n",l1[i],l2[i]);
- scanf("%d",&w[i]);
- }
- wypisz();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement