You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Q6 Write a c program to store N elements in 1 D array then check whether the given sequence of elements is in AP with one missing term if there is a missing tem print the series including the missing term . Do not use temporary array.
//Ex. 1, 2, 4,5,6,7 in AP
// code
/*
count=0;
if((a[i+1]-a[i])==d)
continue;
else{
i++;
if((a[i+1]-a[i]==d)&& count==0){
count++;
index=i-1;
}
if((a[i+1]-a[i]==d)&& count!=0)
{
print(not an ap);
index=0;
break;
}
}
if(index!=0){
now insert that missing element using index value using insertion method in array }