Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sahil.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include<iostream>
using namespace std;
int main()
{
cout<<" i am good";
return 0;
}
22 changes: 22 additions & 0 deletions sahilprom.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include<iostream>
using namespace std;
int main()
{
int a,b,n,x,y,ar[100];
cout<<"\nEnter no. of elements of array (upto 100):";
cin>>n;
cout<<"\nNow, Enter Elements\n";
for(b=0;b<n;b++)
{ cout<<"Enter "<<b+1<<" element:"; cin>>ar[b]; }
x=0;y=n;
while(x!=1)
{ x=0;
for(b=1;b<y;b+=2)
{
ar[x]=ar[b]; ++x;

} y=x;
}
cout<<"the last no. left is:----"<<ar[x];

}