Tuesday, 19 December 2017

Learn C language Part 15 Print lower Trianlge pattern nested loop

#include <stdio.h>

#include <conio.h>



main()

{



int i=0,j=0;

for(i=0;i<10;i++)

{





for(j=0;j<=i;j++)

{



printf("x");



}

printf("\n");













}

//outer loop end...................



























}




Learn C language Part 14 Print Upper Trianlge pattern nested loop





#include <stdio.h>

#include <conio.h>



main()

{





int i=0,j=0;







for(i=0;i<5;i++)

{





for(j=i;j<5;j++)

{



printf("*");

}



printf("\n");







} //outer looop





























}




Learn C language Part 13 Print Square using nested loop





#include <stdio.h>

#include <conio.h>



main()

{





int i=0,j=0;







for(i=0;i<5;i++)

{





for(j=0;j<15;j++)

{



printf("*");

}



printf("\n");







} //outer looop





























}




Sunday, 17 December 2017

Learn C language Part 11 Do while loop in C language




#include <stdio.h>
#include <conio.h>

main()
{

int x=1;

do
{
printf("salman");
x++;
}
while(x>1);

}

Learn C language Part 10 Factorial program using while loop in c





#include <stdio.h>

#include <conio.h>



main()

{



int fac=1,x=4;



printf("Enter the number: ");

scanf("%d",&x);



int y=x;

while(x>1)

{



fac=fac* x;



x--;

}



printf("%d ! = %d ",y,fac);



}


Learn C language Part 9 while loop in c





#include <stdio.h>

#include <conio.h>



main()

{



int x=0;



while(x<=10)

{



printf("salman %d\n",x);

x++;

}



printf("\nLoop break");







}

Thursday, 14 December 2017

Learn C language Part 8 how to show Maths tables using for loop





#include <stdio.h>

#include <conio.h>



main()

{



int t,n,i;

printf("Enter the number which table you want to show: ");

scanf("%d",&t);



printf("Enter the limit of table: ");

scanf("%d",&n);







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

{



printf("%d  x  %d = %d\n",t,i,t*i);





}







}


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 ...