#include<stdio.h>

int main (void)
{
int x,y,z,t;

printf("金額tを入力してください>>");
scanf("%d",&t);
for(x=0;x<=5;x++)
{
for(y=0;y<=4;y++)
{
for(z=0;z<=3;z++)
{
if(t == 50*x+80*y+120*z)
{
printf("50円×%d枚+80円×%d枚+120円×%d枚"\n",x,y,z);
}
}
}
}
return 0;
}

これであってますか?