![]() Note: In Simple Interest formula we are dividing by 100.0 because the ( Principal_amount * Rate_of_interest * Time ) might yield a floating / double type value, so if we divide it by integer 100 then it might give wrong result. In Common Lisp you could define a read macro that dispatched on square brackets (the. ![]() Simple_Interest = ( Principal_amount * Rate_of_interest * Time ) / 100.0 Īmount = Simple_Interest + Principal_amount Can someone explain to me why Lisp macros are better than, say. In this program we take input for Principal amount, rate of interest and time period from the user, and then calculate Simple Interest for those values and also the total amount accumulated after getting simple interest. Printf("Simple Interest: %0.2f\n", SI(p, t, r)) To share workflows that use custom macros, export the workflow to ensure that all workflow dependencies, including the macro, are saved with the workflow. A macro in a workflow is automatically updated when changes made to that macro are saved. ![]() A Blueprint Macro Library is a container that holds a collection of Macros or self. Interest.h #define SI(p, t, r) ( (p * t * r) / 100.0 ) To view a macros workflow, right-click the macro in a workflow and select Open Macro. Blueprints that declare and define macros for reuse in other Blueprints. YouTube Link: Source Code: C Program to Calculate Simple Interest and Amount using Macros
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |