Skip to content

Instantly share code, notes, and snippets.

@annibuliful
Created October 6, 2017 04:10
Show Gist options
  • Save annibuliful/a52aa9fa6d880daa67b943447fe36265 to your computer and use it in GitHub Desktop.
Save annibuliful/a52aa9fa6d880daa67b943447fe36265 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(){
float prices[10];
float quantity[10];
float amount[10];
int i;
printf("please Input price quantity and amount like this: 1 2 \n");
for(i = 0 ; i < 10 ; i++){
scanf("%f %f " , &prices[i] , &quantity[i]);
amount[i] = prices[i] * quantity[i];
}
printf("Inputing is end \nthese are table \n");
for(i = 0 ; i < 10 ; i++){
printf("amount = %.2f , price = %.2f , quantity = %.2f \n" , amount[i] , prices[i] ,quantity[i] );
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment