-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tidied the workspace
- Loading branch information
Showing
25 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
Binary file renamed
BIN
+869 KB
Board Paper Programs/CS-board-questions.docx → ...d Question Solved/CS-board-questions.docx
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
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 power (int, int); | ||
|
||
int | ||
main () | ||
{ | ||
int a, b; | ||
cout << "Enter any two number: "; | ||
cin >> a >> b; | ||
cout << "\nPower = " << power (a, b); | ||
} | ||
|
||
int | ||
power (int base, int exp) // Base and Exponent | ||
{ | ||
int i, result = 1; | ||
// Calculate base^exponent by repetitively multiplying base | ||
for (i = 0; i < exp; i++) | ||
{ // Assign a counter less than exponent | ||
result = result * base; | ||
} | ||
|
||
cout << base << "^" << exp << " = " << result; | ||
return 0; | ||
} |
File renamed without changes.
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,22 @@ | ||
#include<iostream> | ||
using namespace std; | ||
|
||
void swap(int ,int); | ||
int main() | ||
{ | ||
int a,b; | ||
cout<<"Enter the Two Numbers to Swap: "; | ||
cin>>a>>b; | ||
cout<<"\nAfter Swapping of Two Numbers:"; | ||
swap(a,b); | ||
|
||
return 0; | ||
} | ||
void swap(int x,int y) | ||
{ | ||
int z; | ||
z=x; | ||
x=y; | ||
y=z; | ||
cout<<" "<<x<<" "<<y; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.