Program 298: Display Series in AP along with Sum for given Common difference and Number of Terms
//Coming Soon...
Output:
#include<stdio.h> main() { //an=a+(n-1)d int i,n; float sum=0,num1,diff,lastnum,seriesFirstNum; printf("Enter first number of the series\n"); scanf("%f",&num1); printf("Enter Common difference\n"); scanf("%f",&diff); printf("Enter number of terms in the series\n"); scanf("%d",&n); seriesFirstNum=num1; lastnum=(float)(num1+((n-1)*diff)); for(i=1;i<=n;i++) { sum+=seriesFirstNum; seriesFirstNum+=diff; } seriesFirstNum=num1; printf("Terms present in the Series are:\n"); for(i=1;i<=n;i++) { if(i<n) { printf("%.2f,",seriesFirstNum); seriesFirstNum+=diff; } else { printf("%.2f\nSum of the Series is=%.2f\n",seriesFirstNum,sum); seriesFirstNum+=diff; } } }
To find sum of series in A.P for given first and last term of seriesExplanation:
//Coming Soon...
Output:
factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
ReplyDeletefactorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
vegamovies Earlier people were not so much means to watch movies and to watch movies, we had to go to the movies hall where we were not allowed to go without tickets, but now people can watch movies online since the internet became cheaper.