Navigate back to the homepage

A Program to find sum of series from starting number to ending number using for loop in C

Vishnu Damwala,Â
March 2nd, 2020 Â· 1 min read

A tutorial to finding factorial for integer data-type using for loop in C - language

Working example:

`.css-1chxjt6{position:absolute;right:22px;top:24px;padding:8px 12px 7px;border-radius:5px;color:#6f7177;-webkit-transition:background 0.3s ease;transition:background 0.3s ease;}.css-1chxjt6:hover{background:rgba(255,255,255,0.07);}.css-1chxjt6[data-a11y="true"]:focus::after{content:"";position:absolute;left:-2%;top:-2%;width:104%;height:104%;border:2px solid var(--theme-ui-colors-accent,#6166DC);border-radius:5px;background:rgba(255,255,255,0.01);}@media (max-width:45.9375em){.css-1chxjt6{display:none;}}1/**2 * Sum Of Series Between Start To End 3 * Values Using For Loop4 */5#include <stdio.h>6int main()7{8    int i, start, end, result = 0;9    printf(" Enter start & end number: ");10    scanf("%d %d", &start, &end);11    printf("\n Start value : %d", start);12    printf("\n End value : %d", end);1314    for (i = start; i <= end; i += 1)15    {16        //printf("\n I : %d", i);17        //printf("\n Result B4 adding : %d", result);18        result = result + i;19        //printf("\n Result : %d", result);20    }21    printf("\n Sum of series : %d", result);22    printf("\n");23    return 0;24}`

Output:

`1Enter start & end number: 12 2423Start value : 124End value : 245Sum of series : 234`

A Program to display factorial of specified number using for loop in C

A Program to display factorial of specified number using for loop in C.

March 1st, 2020 Â· 1 min read

How to find the length of a string using strlen() in C

C program to find length of a string, for e.g, length of "East or West INDIA is best" is 26 (including space and excluding null character).

February 25th, 2020 Â· 1 min read