Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 printf("help!");
Index -> Programming, C -> C Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
blissfullydysphoric




PostPosted: Tue Sep 16, 2008 9:07 pm   Post subject: printf("help!");

Sorry bad joke.. anyways i was wondering how to print the % sign in the printf command. When I put
code:

        printf("Please enter the interest rate on the investment: %");

where i want the % sign to be infront of the input the user enters.

it gives me an error because the % sign shouldn't be there.
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Tue Sep 16, 2008 9:18 pm   Post subject: RE:printf("help!");

Use a double %, ie. instead of % use %%.
blissfullydysphoric




PostPosted: Wed Sep 17, 2008 9:21 am   Post subject: RE:printf("help!");

Thanks I'll do that!
Display posts from previous:   
   Index -> Programming, C -> C Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: