New course! Every coder should learn Generative AI!
Try a free lesson+ 1
#include <iostream>
using namespace std
int main()
{
int amt;
int c=0,d=0,e=0,f=0,g=0,h=0;
cin>>amt;
for (i=1;i<=amt;i++)
{
if (amt%5==0)
{c++;}
if (amt%10==0)
{d++;}
if (amt%20==0)
{e++;}
If(amt%50==0)
{f++;}
if (amt%100==0)
{g++;}
if (amt%500==0)
{h++;}
}
cout<<c <<d <<e <<f <<g <<h;
//c 5 rupee note d 10 e 20 f 50 g 100 h 500
return 0;
}