#include<stdio.h>
int main()
{
int a;
int b;
int c;
printf("Type value of A : ");
scanf("%i",&a);
printf("\nType value of b : ");
scanf("%i",&b);
c=a;
a=b;
b=c;
printf("A : %i",a);
printf("\nb : %i",b);
return 0;
} Run Code
#include <stdio.h>
int main()
{
int n,i,j;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
return 0;
} Run Code
#include <stdio.h>
int main()
{
int n,i,j;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("\n");
}
return 0;
} Run Code
No comments:
Post a Comment