Thread: Trying to teach myself C programing language, and I am not sure how to solve this...

  1. #16
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,949
    Hahaha....you found a reason to post it. Props...
    Quote Originally Posted by anduril462 View Post
    Now, please, for the love of all things good and holy, think about what you're doing! Don't just run around willy-nilly, coding like a drunk two-year-old....
    Quote Originally Posted by quzah View Post
    ..... Just don't be surprised when I say you aren't using standard C anymore, and as such,are off in your own little universe that I will completely disregard.
    Warning: Some or all of my posted code may be non-standard and as such should not be used and in no case looked at.

  2. #17
    Registered User
    Join Date
    Jun 2011
    Posts
    1
    Code:
    I think this would help you.
    
    #include <stdio.h>
    #include <ctype.h>
    int main()
    {
    int num1;
    
    printf("Insert a number from 0 to 9: ");
    scanf("%d",&num1);
    
    if(num1< 0 || num1>9)
    printf("error\n");
    else if ( num1==0)
     printf("zero");
    else if( num1==1) 
    printf("one");
    else if( num1==2)
     printf("two");
    else if( num1==3)
     printf("three");
    else if( num1==4) 
    printf("four");
    else if( num1==5) 
    printf("five");
    else if( num1==6) 
    printf("six");
    else if( num1==7)
     printf("seven");
    else if( num1==8)
     printf("eight");
    else 
     printf("nine");
    
    return 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help whit programing test In C language
    By alionas in forum C Programming
    Replies: 4
    Last Post: 11-20-2010, 10:37 AM
  2. Correct programing language for games?
    By brack in forum Game Programming
    Replies: 4
    Last Post: 09-03-2010, 05:21 AM
  3. The C Programing Language soln needed
    By xabhi in forum C Programming
    Replies: 5
    Last Post: 08-25-2010, 03:06 PM
  4. Help to solve My easy C programing questions!
    By hotwebs in forum C Programming
    Replies: 13
    Last Post: 12-25-2009, 03:55 AM
  5. chalanging programing to solve
    By j4k50n in forum C Programming
    Replies: 8
    Last Post: 04-20-2007, 03:02 AM

Tags for this Thread