Question: Part 4 Correct errors in program . ( 1 0 points in total): 1) ( 5 points) The following program is used to display numbers

Part

4

Correct

errors in program

.

(

1

0

points in total):

1)

(

5

points)

The following program is used to

display numbers between two intervals

.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

#include stdio.h

#define true 1

#define false 0

void prime(int low, int high){

int i =0, flag=0;

printf("Prime numbers between %d and %d are: ", low, high);

while (low < high)

{

flag = false;

for(i = 0

; i <= low/2; ++i)

{

if(low % i == 0)

{

flag = true;

break;

}

}

if (flag ==

true

)

print

f("%d ", low);

++low;

}

printf("

\

n");

}

int main()

{

int low, high;

printf("Enter two numbers(intervals): ");

scanf("%d %d", low,

high);

prime.

prime(low,high);

return 0;

}

Which line

(s)

is

(are)

incorrect?

And how to correct it

(them)

? Please write down your

correction

for that

line (those lines)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!