From 21f558a23d399d533ecec6d185e57e444612f072 Mon Sep 17 00:00:00 2001 From: sharansk792000 Date: Thu, 15 Oct 2020 02:05:31 +0530 Subject: [PATCH] readme --- C/README.md | 6 +++--- C/program-1/{read.md => README.md} | 0 C/program-10/README.md | 1 + C/program-11/README.md | 1 + C/program-12/README.md | 1 + C/program-13/README.md | 1 + C/program-14/README.md | 1 + C/program-17/README.md | 1 + C/program-18/README.md | 1 + C/program-2/{read.md => README.md} | 0 C/program-7/README.md | 1 + C/program-8/README.md | 1 + C/program-8/program.c | 4 ++-- C/program-9/README.md | 1 + 14 files changed, 15 insertions(+), 5 deletions(-) rename C/program-1/{read.md => README.md} (100%) create mode 100644 C/program-10/README.md create mode 100644 C/program-11/README.md create mode 100644 C/program-12/README.md create mode 100644 C/program-13/README.md create mode 100644 C/program-14/README.md create mode 100644 C/program-17/README.md create mode 100644 C/program-18/README.md rename C/program-2/{read.md => README.md} (100%) create mode 100644 C/program-7/README.md create mode 100644 C/program-8/README.md create mode 100644 C/program-9/README.md diff --git a/C/README.md b/C/README.md index 989061be..2fb8a86b 100644 --- a/C/README.md +++ b/C/README.md @@ -2,7 +2,7 @@ ## This repo contains basics programs in c programming language. | Program No.| Question | | ------- | ------ | -| Program-01 | Program to print pattern | +| Program-01 | Program to print pattern | | Program-02 | Program to check whether the given number is prime or not | | Program-03 | Program to find largest of three number using simple if condition | | Program-04 | Program to find largest of three number using if-else condition | @@ -16,7 +16,7 @@ | Program-12 | Program on relational operators | | Program-13 | Program on bit-wise operator. | | Program-14 | Program on increment and decrement operator. | -| Program-15 | Program to find sum of digits between given range which are divisible by 3 | +| Program-15 | Program to find sum of digits between given range which are divisible by 3 | | Program-16 | Program to check whether the given number is neon or not | | Program-17 | Program to check whether the given number is prefect or not | | Program-18 | Program to check given number is Armstrong or not | @@ -34,7 +34,7 @@ | Program-30 | Program to print the pattern | | Program-31 | Program to take the details of student and print the details of students using array and to add details of new students into the existing array | | Program-32 | Program to take the details of student and print the details | -| Program-33 | Program on Arithematic operation using pointers | +| Program-33 | Program on Arithematic operation using pointers | | Program-34 | Program to determine whether the matrix is a triangular matrix. First, you will be given N, which is the size of the matrix. Then you will be given N rows of integers, where each row consists of N integers separated by spaces. If the input matrix is triangular, then print yes. Otherwise, print no. | | Program-35 | Program where you are given a sequence of non-negative integers terminated by -1. You have to output 1 if there are atleast 2 distinct elements in the sequence and 0 if the sequence consists of only 1 integer. Note that -1 is not part of the sequence. The sequence is not necessarily sorted. | | Program-36 | Program to output the number of distinct elements in the sorted sequence | diff --git a/C/program-1/read.md b/C/program-1/README.md similarity index 100% rename from C/program-1/read.md rename to C/program-1/README.md diff --git a/C/program-10/README.md b/C/program-10/README.md new file mode 100644 index 00000000..e4018498 --- /dev/null +++ b/C/program-10/README.md @@ -0,0 +1 @@ +Program to find square and half of given number without using built-in function and arithmetic operator diff --git a/C/program-11/README.md b/C/program-11/README.md new file mode 100644 index 00000000..98130a55 --- /dev/null +++ b/C/program-11/README.md @@ -0,0 +1 @@ +Program on arithmetic operators diff --git a/C/program-12/README.md b/C/program-12/README.md new file mode 100644 index 00000000..23b4aa06 --- /dev/null +++ b/C/program-12/README.md @@ -0,0 +1 @@ +Program on relational operators diff --git a/C/program-13/README.md b/C/program-13/README.md new file mode 100644 index 00000000..f7c531cf --- /dev/null +++ b/C/program-13/README.md @@ -0,0 +1 @@ +Program on bit-wise operator. diff --git a/C/program-14/README.md b/C/program-14/README.md new file mode 100644 index 00000000..332ffb69 --- /dev/null +++ b/C/program-14/README.md @@ -0,0 +1 @@ +Program on increment and decrement operator. diff --git a/C/program-17/README.md b/C/program-17/README.md new file mode 100644 index 00000000..e0247b34 --- /dev/null +++ b/C/program-17/README.md @@ -0,0 +1 @@ +Program to check whether the given number is prefect or not diff --git a/C/program-18/README.md b/C/program-18/README.md new file mode 100644 index 00000000..bca66da1 --- /dev/null +++ b/C/program-18/README.md @@ -0,0 +1 @@ +Program to check given number is Armstrong or not diff --git a/C/program-2/read.md b/C/program-2/README.md similarity index 100% rename from C/program-2/read.md rename to C/program-2/README.md diff --git a/C/program-7/README.md b/C/program-7/README.md new file mode 100644 index 00000000..7401fe02 --- /dev/null +++ b/C/program-7/README.md @@ -0,0 +1 @@ +Program to find leap year diff --git a/C/program-8/README.md b/C/program-8/README.md new file mode 100644 index 00000000..03120e64 --- /dev/null +++ b/C/program-8/README.md @@ -0,0 +1 @@ +Program to calculate years ,months ,days diff --git a/C/program-8/program.c b/C/program-8/program.c index 1f6d6397..0ce8b9cc 100644 --- a/C/program-8/program.c +++ b/C/program-8/program.c @@ -7,8 +7,8 @@ int main() scanf("%d",&n); y=n/365; m=n%365; - j=m/30; - d=j%30; + j=n/30; + d=n%30; printf("year=%d",y); printf("months =%d",j); printf("days=%d",d); diff --git a/C/program-9/README.md b/C/program-9/README.md new file mode 100644 index 00000000..2942cc8a --- /dev/null +++ b/C/program-9/README.md @@ -0,0 +1 @@ +Program to check two number are equal without logical operator