My Professional Profile

I am Johnson Augustine Sr.Software Engineer and System Architect. I have 10 Yrs of hands on expertise in MVC 5 , Angular 5 , C# MVC Razor, WPF MVVM , Android , IOS Swift 3 , IOS11 MSSQL,MySQL Database,,PHP,C/C++/Visual C++/G++/QT++,Com,DirectX,Open CV,EMGU CV , embedded System Development , [Raspberry PI]. ,html,Javascript,Jquery,Ajax.CSS , Networking ,Cyber security, Ethical Hacking You can see my professional profile at Email :

Saturday, 19 January 2013

C Development

Write a program that accepts a rupee amount(less than one thousand) and computes the number of HUNDRED, FIFTY, TWENTY, TEN, FIVE, TWO  and ONE rupee currencies needed for that amount. Your solution must use the *fewest* number of currencies that are possible for the given rupee amount.
[You may assume that the input is an integer amount greater than 0.]

Eg. Input : 346

Output : HUNDRED-3, TWENTY-2, FIVE-1, ONE-1

Code : by Johnson

void main()
  int c,c1,changes[7],a[7]={100,50,20,10,5,2,1},i=0;
 printf("Enter amount ");

   printf("Currencies of a[j]= %d \n" changes[j]);

No comments:

Post a Comment

Note: only a member of this blog may post a comment.