-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c06f766
Showing
12 changed files
with
186 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include<iostream> | ||
using namespace std; | ||
|
||
int main(){ | ||
int x; | ||
cout<<"Enter the no. to check whether + or - : "<<endl; | ||
cin>>x; | ||
|
||
if(x>0) | ||
{ | ||
cout<<"+"; | ||
|
||
} | ||
|
||
|
||
else if(x==0) | ||
{ | ||
cout<<"The no. is 0"<<endl; | ||
} | ||
|
||
else | ||
{ | ||
cout<<"-"; | ||
} | ||
|
||
|
||
|
||
return 0; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <iostream> | ||
using namespace std; | ||
|
||
int main() | ||
{ | ||
|
||
char mychar; | ||
|
||
do | ||
{ | ||
|
||
cout << "Iam A Programmer"<< "Enter x character to print the message again: "; | ||
cin>>mychar; | ||
|
||
} | ||
|
||
while (mychar == 'x') ; | ||
|
||
return 0; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
// 1.Write a program to print "Iam a Programmwer " 5 times | ||
// 2.Write a program to print multiplication table of 5 | ||
|
||
|
||
/* | ||
#include<iostream> | ||
using namespace std; | ||
int main(){ | ||
for(int i = 1; i<= 5; i++ ) | ||
{ | ||
cout<<"Iam a Programmer"<<endl; | ||
} | ||
return 0; | ||
} | ||
*/ | ||
|
||
|
||
#include<iostream> | ||
using namespace std; | ||
|
||
int main(){ | ||
int x=5; | ||
for(int i = 1; i<= 10; i++ ) | ||
{ | ||
cout<<"5X"<<i<<" = "<<(x*i)<<endl; | ||
} | ||
return 0; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// wap to take input from user and print the corresponding week day. | ||
|
||
#include <iostream> | ||
using namespace std; | ||
|
||
int main() | ||
{ | ||
|
||
int num; | ||
cout << "Enter a Number between 1 and 7: "; | ||
cin >> num; | ||
|
||
switch (num) | ||
|
||
{ | ||
case 1: | ||
cout << "Monday"; | ||
|
||
break; | ||
|
||
case 2: | ||
cout << "Tuesday"; | ||
|
||
break; | ||
|
||
case 3: | ||
cout << "Wednesday"; | ||
|
||
break; | ||
|
||
case 4: | ||
cout << "Thursday"; | ||
|
||
break; | ||
|
||
case 5: | ||
cout << "Friday"; | ||
|
||
break; | ||
|
||
case 6: | ||
cout << "Saturday"; | ||
|
||
break; | ||
|
||
case 7: | ||
cout << "Sunday"; | ||
|
||
break; | ||
|
||
|
||
//optional | ||
|
||
default: | ||
cout<<"Invalid Input"; | ||
|
||
} | ||
|
||
return 0; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include <iostream> | ||
using namespace std; | ||
|
||
int main() | ||
{ | ||
|
||
cout << "Enter the Number ,your table upto 10 will be created :- "; | ||
int x; | ||
cin >> x; | ||
cout << " " << endl; | ||
cout << " " << endl; | ||
cout << "The Table of " << x << " is" | ||
<< " Here 👇" << endl; | ||
cout << " " << endl; | ||
cout << "_____________" << endl; | ||
cout << " " << endl; | ||
|
||
for (int i = 1; i <= 10; i++) | ||
{ | ||
cout << "• "<< x << "X" << i << "=" << (x * i) << endl; | ||
} | ||
cout << " " << endl; | ||
cout << "_____________" << endl; | ||
cout << " " << endl; | ||
|
||
return 0; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <iostream> | ||
using namespace std; | ||
|
||
int main() | ||
{ | ||
char mychar; | ||
cout << "Enter a Character : "; | ||
cin >> mychar; | ||
|
||
while (mychar == 'x') | ||
{ | ||
cout << "Iam A Programmer" | ||
<< " | Enter a Character : "; | ||
cin >> mychar; | ||
} | ||
|
||
return 0; | ||
} |
Binary file not shown.