Thread: Help on C Array
View Single Post
  #3 (permalink)  
Old December 30th, 2003, 03:51 AM
programmed programmed is offline
Authorized User
 
Join Date: Oct 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just a rough idea of what i pick from your request, hope i'm on point.

char array[]={"Jan","Feb","Mar"......"Dec"};
 main()
 {
  int num;
   printf("Enter any number");
    scanf("%d",&num);
     for(int i=0;i<12;++i)
       {
         if(num=array[i])
            {
              printf("%c",array[i]);
            }
        }
  return 0;
 }

Reply With Quote