#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...................
}
My Name Is Salman Masood , I am Computer Science &Amp; Maths Graduate from University of Karachi, Pakistan , Teaching Is My Passion and My Aim Is to Deliver All My Knowledge among Those Students Who Can'T Afford Tutors or Expensive Institute Fees. I Will Be Keep Sharing My All Knowledge and Information with You .... Remember Me in Your Prayers !
Tuesday, 19 December 2017
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);
}
}
Subscribe to:
Posts (Atom)
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 ...
-
Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...
-
Load event: pictureBox3.Image = Image .FromFile( @"C:\Users\salman\Documents\Visual Studio 2013\Projects\WindowsFormsApplication3\W...