#include <stdio.h> void main() { int p,numbered_packets[5],key,count=0; /*let there be some packets to be sent by Indian postal department which are numbered with some codes.After receiving them, we wish to search for a particular numbered packet becoz all packets might have got jumbled up */ for(p=0;p<5;p++) { printf("\n enter the code of numbered_packets[%d]:",p); scanf("%d",&numbered_packets[p]); } printf("\n enter the key code to be searched:"); scanf("%d",&key); for(p=0;p<5;p++) { if(numbered_packets[p]==key) { printf("\n packet with desired key found"); exit(0); } count=count+1; } if(count==5) printf("\n packet with desired key not found"); } ఔట్పుట్ తెరమీద enter the code of numbered_packets[0]:9 enter the code of numbered_packets[1]:7 enter the code of numbered_packets[2]:5 enter the co...
కామెంట్లు
కామెంట్ను పోస్ట్ చేయండి
దయచేసి మీ సలహాలను సూచనలను స్పష్టంగా పేర్కొనగలరు. plz see that ur comments are 'acceptable' in a value based society.