I am trying to make a simple program that will calculate 25% of 480.
When I put the code in using num1 as 480 and num2 as .25 it calculate a number of 0 for the product.
What is the trick to this? what am i doing wrong?
this is the code i am using:
#include <stdio.h>
int main(){
/*declare variables for each integer */
int num1, num2, product;
num1 = 480;
num2 = .25;
product = num1 * num2;
printf("25 percent of $%d is $%d.\n",num1, product);
i'll be sure to look those up. i'm posting in the beginners post because obviously i'm a beginner... this is the first programming I've ever done. its for my intro course at university....so thank u