Like Tree13Likes

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

This is a discussion on Trying to teach myself C programing language, and I am not sure how to solve this... within the C Programming forums, part of the General Programming Boards category; Hahaha....you found a reason to post it. Props......

  1. #16
    Registered User
    Join Date
    May 2011
    Location
    Around 8.3 light-minutes from the Sun
    Posts
    1,866
    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;
    }
    ARod609 likes this.

Page 2 of 2 FirstFirst 12
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, 06:21 AM
  3. The C Programing Language soln needed
    By xabhi in forum C Programming
    Replies: 5
    Last Post: 08-25-2010, 04: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, 04:02 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21