This file contains hidden or 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
#include <iostream> | |
#define SIZE 10 | |
void bubblesorting(int a[SIZE]); | |
using namespace std; | |
int main(void) { | |
int usr[SIZE]={0},i=0; | |
cout << '\t'<<"Welcome" << endl<<"Please enter 10 number for sorting: "; | |
for(i=0;i<SIZE;i++){ | |
cin >>usr[i]; | |
} |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int fact(int); | |
int main(){ | |
cout << "Please enter a positive integer: "; | |
int user,final; | |
cin >> user; | |
cout <<"Your factorial of number is: "<<fact(user)<<endl; | |
} |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
void armstrong(int num); | |
int main(void){ | |
int i; | |
for(i=100;i<999;i++) | |
armstrong(i); | |
} | |
void armstrong(int num){ | |
int temp; |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
void perfectnumber(int num); | |
int main(){ | |
int low,high,sum=0,temp; | |
cout <<"Please enter two integer"<<endl; | |
cout << "Integer 1: "; | |
cin >>low; | |
cout << "Integer 2: "; | |
cin >>high; |
NewerOlder