From 861795083e162dde7edf9444dd229a790d7b222d Mon Sep 17 00:00:00 2001 From: ManikanthReddyMandala <43068886+ManikanthReddyMandala@users.noreply.github.com> Date: Sat, 13 Oct 2018 20:24:46 +0530 Subject: [PATCH 1/4] added helloworld --- main - Copy.c | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 main - Copy.c diff --git a/main - Copy.c b/main - Copy.c new file mode 100644 index 0000000..ebaca5f --- /dev/null +++ b/main - Copy.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("Hello world!\n"); + return 0; +} From 8690c4824b20cce9d9dd2f321c6b23cf895ab18b Mon Sep 17 00:00:00 2001 From: ManikanthReddyMandala <43068886+ManikanthReddyMandala@users.noreply.github.com> Date: Sat, 13 Oct 2018 20:38:02 +0530 Subject: [PATCH 2/4] denomination program is added in c --- demn - Copy.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 demn - Copy.c diff --git a/demn - Copy.c b/demn - Copy.c new file mode 100644 index 0000000..7007f49 --- /dev/null +++ b/demn - Copy.c @@ -0,0 +1,47 @@ +#include +void main() +{ + int i=1,a[6],n; + printf("enter sum\n"); + scanf("%d",&n); + switch(i) +{ + case 1:{ + a[1]= n/100; + n=n%100; + } + + case 2:{ + a[2]= n/50; + n=n%50; + } + + case 3:{ + a[3]= n/10; + n=n%10; + } + + case 4:{ + a[4]= n/5; + n=n%5; + } + + case 5:{ + a[5]= n/2; + n=n%2; + } + + case 6:{ + a[6]= n/1; + + } +} + + printf("hundreds=%d\n",a[1]); + printf("fifties=%d\n",a[2]); + printf("tens=%d\n",a[3]); + printf("fives=%d\n",a[4]); + printf("twos=%d\n",a[5]); + printf("ones=%d\n",a[6]); +} + From 7360494395ad13f791fd5dc09ae644f0689d5263 Mon Sep 17 00:00:00 2001 From: ManikanthReddyMandala <43068886+ManikanthReddyMandala@users.noreply.github.com> Date: Sat, 13 Oct 2018 20:51:57 +0530 Subject: [PATCH 3/4] form 1 added inc language --- fm1 - Copy.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 fm1 - Copy.c diff --git a/fm1 - Copy.c b/fm1 - Copy.c new file mode 100644 index 0000000..77595dd --- /dev/null +++ b/fm1 - Copy.c @@ -0,0 +1,24 @@ +#include +int main() +{ + int i,ct,n=1,j; + for(i=1;i<=4;i++) + { + ct=0; + for(j=i;j<=3;j++) + { + printf("\t"); + } + while(ct!=i) + { + ct++; + + printf("\t\t%d",n); + n++; + } + printf("\n"); + printf("\n"); + } + return 0; +} + From 3749b786b65c1628a95792bd77c262701ad70dd0 Mon Sep 17 00:00:00 2001 From: ManikanthReddyMandala <43068886+ManikanthReddyMandala@users.noreply.github.com> Date: Sat, 13 Oct 2018 20:53:28 +0530 Subject: [PATCH 4/4] added combination program in c. --- cmbn - Copy.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 cmbn - Copy.c diff --git a/cmbn - Copy.c b/cmbn - Copy.c new file mode 100644 index 0000000..47903d9 --- /dev/null +++ b/cmbn - Copy.c @@ -0,0 +1,37 @@ +#include +void main() +{ + int i,ct,n,k,x; + for(n=1;n<=3;n++) + { + ct=1; + for(i=0;ct<=3;i=(i+1)%3,ct++) + { + k=i+1; + if(n==3&&ct==3) + { + k=1; + } + if(k==n&&ct<3) + { + //printf("hdhbc") + continue; + } + + if(k!=n&&ct<3) + { + x=k; + continue; + } + if(ct==3) + { + printf("%d",n); + printf("%d",x); + printf("%d\n",k); + printf("%d",n); + printf("%d",k); + printf("%d\n",x); + } + } +} +}