faithchebet901 faithchebet901
  • 21-07-2021
  • Computers and Technology
contestada

Develop a c program to display the following input output interphase enter a number 5
The table of 5 is
5*1=5
5*2=10

Respuesta :

tonb
tonb tonb
  • 21-07-2021

Answer:

int main()

{

int number;

printf("Enter a number: ");

scanf_s("%d", &number, sizeof(number));

for (int i = 1; i <= 2; i++) {

 printf("%d*%d=%d\n", number, i, number * i);

}

}

Explanation:

I used the safe scanf_s() that takes a third parameter to indicate the size of the buffer. In this case it is the size of an integer.

Answer Link

Otras preguntas

Convert 2x - 3y + 1 = 0 to slope-intercept form
2. How does Oliver violate the rules of the workhouse?
what the decimal of 2 1/4
what feature of a confederal system did the confederate states of america most want
Which best explains how the structure of the office of the president helps fulfill the office’s role? A The office is led by the chief of staff, who serves as a
the surface of water connect like a sort of sort of skin due to property of liquids called
A machine drops 74 milliliters of liquid into a beaker every minute. Using an empty beaker, Sarah started the machine and left the room. When she returned, the
a jet takes 5 3/4 hours to fly 2,475 mi from new york city to los angeles. about how many hours will a jet flying at the same average rate take to fly 5,452 mi
Three differences and one similarity between Shakespeare world and our own
What are the adaptive immune responses induced following acute and chronic infection with HIV?