2. #include<stdio.h>
3. #include<conio.h>
4. void main()
5. {
6. struct scooter
7. {
8. char srno[5];
9. int year;
10. char color[10];
11. int hp;
12. }sc[10];
13. int i,ch,n;
14. clrscr();
15. while(1)
16. {
17. printf("\n 1:add scooter info");
18. printf("\n 2:information of scooters within a range BB0 and CC9");
19. printf("\n 3:Display the oldest scooter");
20. printf("\n 4:exit");
21. printf("\n enter the choice");
22. scanf("\n %d",&ch);
23. switch(ch)
24. {
25. case 1:
26. printf("\n how many record u add");
27. scanf("\n %d",&n);
28. for(i=0;i
29. {
30. printf("\n enter sr no");
31. scanf("\n %s",&sc[i].srno);
32. printf("\n enter year");
33. scanf("\n %d",&sc[i].year);
34.
35. printf("\n enter color");
36. scanf("\n %s",&sc[i].color);
37. printf("\n enter hp");
38.
39. scanf("\n %d",&sc[i].hp);
40. }
41. break;
42. case 2:
43. for(i=0;i
44. {
45. if(sc[i].srno>="bb0" || sc[i].srno<="cc9")
46. {
47. printf("\n srno is%s",sc[i].srno);
48. printf("\n year is%d",sc[i].year);
49. printf("\n color is%s",sc[i].color);
50. printf("\n hp is%d",sc[i].hp);
51. }
52. }
53. break;
54. case 3:printf("\n the oldest scooter is %c",sc[0]);
55.
56. printf("\n srno is%s",sc[0].srno);
57. printf("\n year is%d",sc[0].year);
58. printf("\n color is%s",sc[0].color);
59. printf("\n hp is%d",sc[0].hp);
60. break;
61. case 4:exit(0);
62. }
63. }
64. getch();
65. }
/
Recent Posts
Posted on 2019-07-18
Posted on 2019-07-18
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-07-17
Posted on 2019-05-28
Posted on 2019-05-24
Posted on 2019-05-24
Posted on 2019-05-23
Posted on 2019-05-23
Posted on 2019-05-23
Posted on 2019-05-23
Posted on 2019-05-23
Posted on 2019-05-23
Posted on 2019-05-23
Posted on 2019-05-23
Posted on 2019-05-23