re-write the correct program. #include
int main()
int a, b, sum;
print("\nEnter two no: ");
scanf("%I %I", &a, &b);
sum = a + b
print("Sum : %d", sum);
return 0;
}
Answers
Answered by
0
Answer:
#include <stdio.h>
int main() {
int a , b , sum;
printf("Enter 2 numbers \n");
scanf("%d" , &a);
scanf("%d" , &b);
sum = a + b;
printf("The sum is %d" , sum);
return 0;
}
Explanation:
errors -
%l is the format specifier for integer. The correct format is %d , %i or %u.
sum = a + b (missing semicolon ';')
Hope it helped if yes please mark as brainliest
Similar questions
Math,
2 days ago
Math,
4 days ago
Math,
8 months ago
Math,
8 months ago
Social Sciences,
8 months ago