From 850bf38598b46274d6658de84cbbb3936d5c80df Mon Sep 17 00:00:00 2001 From: Zaid Parkar Date: Sun, 16 Oct 2022 11:06:16 +0530 Subject: [PATCH] Update Harmonic Progression.txt --- Loops/Basic/Harmonic Progression.txt | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Loops/Basic/Harmonic Progression.txt b/Loops/Basic/Harmonic Progression.txt index 84768dc..13afd72 100644 --- a/Loops/Basic/Harmonic Progression.txt +++ b/Loops/Basic/Harmonic Progression.txt @@ -4,4 +4,30 @@ Output: Nth term #Example: Input: A=2, D=4, N=5 -Output: 0.055 (Approx) \ No newline at end of file +Output: 0.055 (Approx) + +Contributor Zaid PARKAR + +#include +void main() +{ + int i,n; + float s=0.0; + printf("Input the number of terms : "); + scanf("%d",&n); + printf("\n\n"); + for(i=1;i<=n;i++) + { + if(i