fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. int a1=5,a2=5,a3=5,a4=10;
  5. int sum1, sum2, sum3;
  6.  
  7. printf("Input your number: a1 \n");
  8. scanf("%d",&a1);
  9. printf("Input your number: a2 \n");
  10. scanf("%d",&a2);
  11. printf("Input your number: a3 \n");
  12. scanf("%d",&a3);
  13.  
  14.  
  15.  
  16. sum1=a1+a4;
  17. sum2=a2*a3;
  18.  
  19.  
  20. printf("%d+%d=%d\n",a1,a4,sum1);
  21. printf("%d-%d=%d\n",a2,a3,sum2);
  22.  
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Input your number: a1 
Input your number: a2 
Input your number: a3 
5+10=15
5-5=25