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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int arrSize, value; | |
bool found=false ; | |
cout<<"Enter array size: "; |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
const int size1=5 , size2=6 , newSize=size1+size2; | |
int arr1[size1], arr2[size2] , newArr[newSize]; | |
cout<<"Enter arr1 data: "<<endl; |
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
#include <iostream> | |
using namespace std; | |
void swapper(int& x,int& y) | |
{ | |
int temp=x; | |
x=y; | |
y=temp; | |
} |
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
#include <iostream> | |
using namespace std; | |
bool isPrime(int N){ | |
int divider; | |
for(divider=N-1 ; divider>1 && N%divider!=0 ; divider--); | |
if(divider==1)return true; | |
else return false; |
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
#include <iostream> | |
using namespace std; | |
int getSumNeg(int a[],int a_length) | |
{ | |
int sum=0; | |
for(int i=0 ; i<a_length ; i++) | |
{ |