I found it thanks, here is my code for those who will need it in the future.
int main()
{
float cost; //Define the cost as float
float paid; //Define payments as float
Type: Posts; User: ammar555
I found it thanks, here is my code for those who will need it in the future.
int main()
{
float cost; //Define the cost as float
float paid; //Define payments as float
Here is my code
#include <stdio.h>
#include <stdlib.h>
const int QUARTER = 25;
I'm trying to make a program that calculates the change , like below.
Total Cost: 2.23
Paid: 3.00
Results: $.77
3 quarters
0 dimes
0 nickels
Here is my code, but it doesn't quit work.
int main()
{
float cost; //Define the cost as float
float paid; //Define payments as float
float sum;
Hi,
I'm new to C, I would like to achieve the following.
get two numbers after the decimal point
23.456 -> 0.45
11.235224 -> 0.23
and get all the numbers before the decimal point