fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<math.h>
  4. #include<string.h>
  5.  
  6. main(){
  7.  
  8. int diceroll1,diceroll2,diceroll3,sum=0,sum1;
  9. int rolls;
  10. char high;
  11.  
  12.  
  13. diceroll1=(rand()%6)+1;
  14. diceroll2=(rand()%6)+1;
  15. diceroll3=(rand()%6)+1;
  16. printf("%d\n",diceroll1);
  17. printf("%d\n",diceroll2);
  18. printf("%d\n",diceroll3);
  19.  
  20. sum=diceroll1+diceroll2+diceroll3;
  21. printf("%d\n\n\n",sum);
  22.  
  23. printf("Pleace Enter you input with simpl letters/n");
  24. scanf("%c",&high);
  25.  
  26.  
  27. diceroll1=(rand()%6)+1;
  28. diceroll2=(rand()%6)+1;
  29. diceroll3=(rand()%6)+1;
  30. printf("%d\n",diceroll1);
  31. printf("%d\n",diceroll2);
  32. printf("%d\n",diceroll3);
  33. sum1=diceroll1+diceroll2+diceroll3;
  34. printf("%d\n",sum1);
  35.  
  36.  
  37.  
  38.  
  39. if(high=='h'&&sum>sum1){
  40. printf("Good Gues it's high value");
  41. }
  42. else if(high=='l'&&sum<sum1){
  43. printf("Good Gues it's Low Value");
  44. }
  45. else if(high=='s'&& sum==sum1){
  46. printf("equal");
  47. }
  48. else{
  49. printf("You Suck");
  50. }
  51. }
  52.  
  53.  
Success #stdin #stdout 0s 2164KB
stdin
Standard input is empty
stdout
2
5
4
11


Pleace Enter you input with simpl letters/n2
6
2
10
You Suck