This is a discussion on Solve the problem, if you possible? within the C and C++ Programming forums, part of the Software Development category; Hello all, I want to Print the output like this, "Addition of <value of variable> + 1 = <...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hello all, I want to Print the output like this, "Addition of <value of variable> + 1 = <sum of (variable+1)>" For Example:- Input:- variable = 5 output will be... Addition of 5+1 = 6 Note:- Using Only one variable
__________________ Regards, VELHARI I am not totally useless. I can be used for a bad example Last edited by velhari : 11-17-2007 at 03:23 AM. |
| Sponsored Links |
| |||
| Another solution is, int d=5; printf("additon of %d + 1 = %d",d++);
__________________ Regards, VELHARI I am not totally useless. I can be used for a bad example |
| |||
| Quote:
output of the above code will be addition of 5 + 1 = because the second parameter for the last %d is missing so it should be like this int d=5; printf("additon of %d + 1 = %d",d,d+1); to get the out as follows adition of 5 + 1 is 6
__________________ SeeSamJagan- Sky is not the "LIMIT", Death is not the END, There is still something beyond.... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to solve this problem(The remote server returned an error: (401) Unauthorized.) | GDevakii | ASP and ASP.NET Programming | 0 | 09-28-2007 10:15 PM |
| How to solve DVD slow read problems in Windows XP | itbarota | Computer Hardware | 2 | 08-06-2007 07:51 AM |
| What are the different problems that “Data mining” can solve? Data warehousing | oxygen | Database Support | 1 | 07-26-2007 03:37 AM |
| How to solve the SQDataReader not closed problem when excuting another query during i | Archer | C# Programming | 1 | 07-23-2007 11:30 PM |
| Problem on .net 3.0 WPF! | theone | C# Programming | 0 | 07-19-2007 09:56 PM |