Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Tidied the workspace
  • Loading branch information
adi-075 committed Apr 23, 2021
1 parent 097e463 commit 0853d05
Show file tree
Hide file tree
Showing 25 changed files with 49 additions and 0 deletions.
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file added Board Paper Programs/Question Bank Sol/prog10
Binary file not shown.
Binary file added Board Paper Programs/Question Bank Sol/prog15
Binary file not shown.
Binary file added Board Paper Programs/Question Bank Sol/prog18
Binary file not shown.
27 changes: 27 additions & 0 deletions Board Paper Programs/Question Bank Sol/prog18.cpp
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;
}
Binary file added Board Paper Programs/Question Bank Sol/prog20
Binary file not shown.
22 changes: 22 additions & 0 deletions Board Paper Programs/Question Bank Sol/prog20.cpp
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;
}
Binary file added Board Paper Programs/Question Bank Sol/prog9
Binary file not shown.

0 comments on commit 0853d05

Please sign in to comment.