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

Add files via upload #27

Open
wants to merge 3 commits 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
13 changes: 13 additions & 0 deletions 100N.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>

using namespace std;

int main()
{
static int i=1;
if (i<= 100)
{
cout<<i++<<" ";
main();
}
}
25 changes: 25 additions & 0 deletions design.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <iostream>

using namespace std;

int main()
{
int a;
cout<<"Enter the No. of Rows"<<endl;
cin>>a;
for ( int i=1; i<=a; i++)
{
int c;
c= a-i;
for (int j=1; j<=c; j++)
{
cout<<" ";
}
for (int k=0; k<i; k++)
{
cout<<"#";
}
cout<<endl;
}

}
40 changes: 40 additions & 0 deletions divisible by 5&11.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <iostream>

using namespace std;

int main()
{
/*int a;
cout<<"Enter a number to see either it is divisible by 5 and 11 or not.\n";
cin>>a;
if (a%5)
{
(a%11)? cout<<"The number is neither divisible by 5 nor 11.\n" : cout<<"The Number is Only divisible by 11.\n";
}
else
{
(a%11)? cout<<"The number is only divisible by 5.\n" : cout<<"The number is divisible by both 5 nor 11.\n";
}*/
int a,b,c;
cout<<"enter two number \n";
cin>>a>>b;
cout<<"1. for addition\n 2. for substraction\n 3 for multiolication\n 4 for division\n";
cin>>c;
switch(c)
{
case 1:
cout<<"add is "<<a+b;
break;
case 2:
cout<<"substraction is "<<a-b;
break;
case 3:
cout<<"multiplaction is "<<a*b;
break;
case 4:
cout<<"division is "<<a/b;
break;
default:
cout<<"invalid input";
}
}