Computer Science, asked by thakurajayzb4811, 4 days ago

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 samarthkrv
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