Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

my first pr for tshirt #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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];

}