Advertisement
adventuretimeh

3 lati di un triangolo 3 parte

Jan 17th, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. int main(int argc, char *argv[])
  7.  {
  8.     int a,b,c;
  9.     printf("\n dammi il valore a");
  10.     scanf("%d",&a);
  11.     printf("\n dammi il valore b");
  12.     scanf("%d",&b);
  13.     printf("\n dammi il valore c");
  14.     scanf("%d",&c);
  15.    
  16.     if((a==b)&&(a==c))
  17.     {
  18.     printf("\n il triangolo è equilatero");
  19.     }
  20.     else
  21.         if((a==b)||(b==c)||(a==c))
  22.         {
  23.             printf("\n il triangolo è isoscele");
  24.         }
  25.         else
  26.             printf("\n il triangolo è scaleno");
  27.    
  28.    
  29.  
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement