Thursday, 14 December 2017

Learn C language Part 7 sum of natural n numbers & limit of a integer v...







#include <stdio.h>

#include <conio.h>



main()

{



 //1 -100

int i=0,n;

float x;

l1:
x=0;


printf("Enter the number: ");

scanf("%d",&n);



for(i=1;i<=n;i++)

{



x=x+i;



}



printf("sUM OF 100 = %.1f",x);

printf("\n\n\n");

printf("----------------------------------------------");



goto l1;





}


No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...