I'm making a credit card billing statement so i kinda need to use an array to save multiple variables. so is there a way to use array on float because decimal numbers is very much needed in my program...thnx for the reply in advance
Of course you can use array with floats (or better doubles) but I guess since you want to make a program working with credit card (even if it's a toy program only) you should first consider what kind you want your array to accomplish.
Integer has the benecit to be exact and to make this ideal for comparison.
Float
s have more flexibility in representing numbers but lack this exactness meaning you can store amount on them but it's not a good idea to store card id for example.
Make x an integer and have your main function return an integer.
Functionally, I'm not sure if that will fix your program in the sense that it'll do what you want it to; I haven't looked that far ahead yet and that'll be up to you.