SHARE
TWEET

Untitled

a guest Mar 19th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. #include<time.h>
  3. #include<stdlib.h>
  4. void main(void)
  5.  {
  6.   int addendo1,addendo2,somma;
  7.   srand(time(NULL));
  8.   addendo1=rand()%100;
  9.   srand(time(NULL)+1);
  10.   addendo2=rand()%100;
  11.  
  12.   printf("quanto fa %d + %d ? \n",addendo1,addendo2);
  13.   scanf("%d \n",&somma);
  14.  
  15.   if (somma==addendo1+addendo2)
  16.    {
  17.     printf("risultato corretto!");
  18.    }
  19.   else
  20.    {
  21.     printf("risultato errato, il risultato corretto รจ %d",addendo1+addendo2);
  22.    }
  23.    printf("\n");
  24.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top