Program # include # include <iostream> <cstdlib> using namespace std; int rank (int a, int n) {int k, results; result = 1; for (k = 1; k <= n; k + +) {result = result * a; } Return result; } Int main (int argc, char * argv []) {int a, n; cout << "Enter a number:"; cin >> acca a; cout << endl; cout << "Enter the ranks:"; cin >> n; cout << endl; cout << "Result powers =" << rank (a, n); cout << "\ n"; cout << endl; system ("PAUSE"); EXIT_SUCCESS return; }
2014 (12) April (12) Assignment Database ERD Reflection Into Database - Database Into Reflection acca 6 - 5 String Matching Program Program Program Brute Force Prime Numbers Karma Numbers acca Exchange Program Minimum Maximum Reflections Program Database acca 4th Reflection Base Data 3rd Individual acca Assignment Reflections Database 1 to Database 2 2013 (19) June (2) May (1) April (9) March (7)
No comments:
Post a Comment