Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  miss.cpp
Language: C/C++
Code:
#include <stdio.h>
int getno(int a[],int n)
{
int i,total;
total=(n+1)*(n+2)/2;
for(i=0;i<n;i++)
total -=a[i];
return total;
}
int main()
{
int a[]={1,2,4,5,6};
int miss=getno(a,5);
printf("%d",miss);
getchar();
}

          
Comments: