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 <stdio.h> | |
//Compiler version gcc 6.3.0 | |
int main() | |
{ | |
int a[5],n,i,f=0; | |
printf("\nenter array element"); | |
for(i=0;i<5;i++) | |
scanf("%d",&a[i]); | |
printf("\nenter element u want to search from array"); |
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 tower(int n,char src,char aux,char targ) | |
{ | |
if(n==1){ | |
cout<<"transfer disk"<<n<<src<<"to"<<targ;} | |
else | |
{ | |
NewerOlder