First Method:
#include <stdio.h>
int main() {
float n, d, np;
printf("Enter a number:");
scanf("%f", &n);
d = n * 0.10;
np = n - d;
printf("Pay Rs = %.2f", np);
return 0;
}
Second Method:
#include <stdio.h>
int main() {
float np;
printf("Enter a number:");
scanf("%f", &np);
np = np - (np * 0.10);
printf("Pay Rs = %.2f", np);
return 0;
}
Third Method:
#include <stdio.h>
int main() {
float np;
printf("Enter a number:");
scanf("%f", &np);
printf("Pay Rs = %.2f, np * 0.9);
return 0;
}
No comments:
Post a Comment