Addition Example for Run Time value (Using scanf)
#include <stdio.h>
int main() {
double num1, num2;
printf("Enter the first number: ");
scanf("%lf", &num1);
printf("Enter the second number: ");
scanf("%lf", &num2);
double sum = num1 + num2;
printf("Sum of %.2lf and %.2lf is %.2lf\n", num1, num2, sum);
return 0;
}
Comments
Post a Comment