A C Program to ask the price of an item in decimal and separate rupees and paise.
#include<stdio.h>
#include<conio.h>
void main()
{
float price,rs,paise,z;
clrscr();
printf("Enter price of an item:");
scanf("%f",&paise);
z=price*100; //Converting price in paise..
rs=z/100; //Dividing that paisa by 100 will give Rupees.
paisa=z%100; //Modulo by 1oo will give paise.
printf("Rupees:%f",rs);
printf("Paise:%f",paise);
getch();
}
this code doesn't works...
ReplyDeleteprog.c:2:18: fatal error: conio.h: No such file or directory
#include
^
compilation terminated.
tu chutiya hai
ReplyDeletefloat pe kabhi modules funtion kaam nhi krta
Deletehis idea is correct but the code is wrong
Deletetry this one
#include
int main()
{
float price,rs,paise;
int a;
printf("Enter price of an item:");
scanf("%f",&price);
a=price*100;
rs=a/100;
paise=a%100;
printf("Rupees:%f",rs);
printf("Paise:%f",paise+1);
}
pronorabda-High Point Timothy Wilson https://marketplace.visualstudio.com/items?itemName=6squalpecuchi.Them---The-Summoning-gratuita-2021
ReplyDeleteatneystinem
incedasa Diana Claborn https://www.electronet.com.ve/profile/neddymnoelannya/profile
ReplyDeleteacveluawest
eximOic_ma Nathan Plowden click
ReplyDeletedownload
click
click here
croclojuslo
deuafXviure Christi Patel Avid Pro Tools
ReplyDeleteBandicam
Autodesk Maya
macalcemis
0tescuem_hi-1981 Jordan Shamoon Awesome
ReplyDeleteSoftware
nalematme