From c6283c6fd677d0d2a474f7120775fa75bd68f3d4 Mon Sep 17 00:00:00 2001 From: Swasthik shetty <42874695+swaaz@users.noreply.github.com> Date: Tue, 6 Aug 2019 22:52:23 +0530 Subject: [PATCH 1/2] Update program.c --- program-20/program.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/program-20/program.c b/program-20/program.c index bfe8670d..ed865cda 100644 --- a/program-20/program.c +++ b/program-20/program.c @@ -1,8 +1,20 @@ -#include -void main() -{ -if(printf("hello world\n")) -{ +#include +#include -} +int main() +{ int a=7,b=2; + // printf("enter two number !\n"); + //scanf("%d%d",&a,&b); + printf("%d",a/b); + + printf("%d\n",(float)a/b); + printf("%d\n",(float)a/(float)b); + printf("%d\n",a/(float)b); + + printf("%f\n",a/b); + printf("%f\n",(float)(a/b)); + printf("%f\n",(float) a/b); + printf("%f\n",(float)a/(float)b); + printf("%f\n",a/(float)b); + return 0; } From 6b512cc739de8819e9f1fbfad1e2b1f28db22ab3 Mon Sep 17 00:00:00 2001 From: Swasthik shetty <42874695+swaaz@users.noreply.github.com> Date: Tue, 6 Aug 2019 22:53:31 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 98ba3380..df158a98 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ | Program-17 | Program to check whether the given number is prefect or not | | Program-18 | Program to check given number is Armstrong or not | | Program-19 | Program to find power of a given number | +| Program-20 | Program to convert datatype explicitly | | Program-21 | Program to check whether the given number is prime or not | | Program-22 | Program to find GCD and LCM of given two number | | Program-23 | Program to find number of digits in a given number |