Question: C language, beginner level You are given a list (array) of n-1 integers and these integers are in the range of 1 to n. There
C language, beginner level
You are given a list (array) of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in list. One of the integers is missing in the array. Write a C program to find the missing integer. The example is below and user input is in boldface. Example: Enter number of elements in array(n): 6 Input (n-1): 1 2 3 5 6 Expected output: 4 Hint: 1. Get the sum of numbers: SUM = n*(n+1)/2 2. Subtract all the numbers from sum and you will get the missing number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
