In this exercise, we learn how to write a C Program to find a given number is the sum of first n natural numbers?. We will write the C Program to find the given number is the sum of first n natural numbers or not using the loop and binary search. Let see an example,
Output:
need an explanation for this answer? contact us directly to get an explanation for this answerEnter number = 10
Sum of Natural number 1 to 4