Wednesday, 8 September 2021

Write a program to print the diamod shaped Pyramid of alphabets.....

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

void main()
{
	
	int i,j,rows,k;
	
	printf("Enter a number to define the rows :");
	scanf("%d",&rows);
	
	int space=rows-1,num=1;
	printf("\n");
	for(i=1;i<=rows;i++)
	{
		for(j=1;j<=space;j++)
		{
			printf(" ");
			
		}
		for(k=1;k<=num;k++)
		{
			printf("%c",'A'+k-1);
		}
		
		if(space>i)
	{
		space=space-1;
		
		num=num+2;
	}
	if(space<i)
	{
		space=space+1;
		
		num=num-2;
	}
	printf("\n");
	
	}
	
	getch();
}



Write a program to print the inverted full Pyramid of alphabets...

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

void main()


{
	
	int i,j,rows,k;
	
	printf("Enter a number to define the rows: ");
	scanf("%d",&rows);
	
	for(i=1;i<=rows;i++)
	{
		for(j=1;j<=i;j++)
		{
			printf(" ");
		}
		
		for(k=i;k<=rows;k++)
		{
			printf("%c ",'A'+k);
		}
		printf("\n");
	}
	getch();
}
YouTube Video..

Write a program to print the full Pyramid of alphabets...

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

void main()
{
	int i,j,rows,k,ch='A';
	
	printf("Enter a number to define the rows :");
	scanf("%d",&rows);
	
	for(i=1;i<=rows;i++)
	{
		for(j=1;j<=rows-i;j++)
		{
			printf(" ");
			
		}
		for(k=1;k<=(2*i-1);k++)
		{
			printf("%c",ch);
		}
		ch++;
		printf("\n");
	}
	getch();
}
Youtube video.

Write a program to print the diamod shaped Pyramid of alphabets.....

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

void main()
{
	
	int i,j,rows,k;
	
	printf("Enter a number to define the rows :");
	scanf("%d",&rows);
	
	int space=rows-1,num=1;
	printf("\n");
	for(i=1;i<=rows;i++)
	{
		for(j=1;j<=space;j++)
		{
			printf(" ");
			
		}
		for(k=1;k<=num;k++)
		{
			printf("%c",'A'+k-1);
		}
		
		if(space>i)
	{
		space=space-1;
		
		num=num+2;
	}
	if(space<i)
	{
		space=space+1;
		
		num=num-2;
	}
	printf("\n");
	
	}
	
	getch();





YouTub Video:

Monday, 6 September 2021

How to print the full Pyramid of Star....Using c program..

 #include <stdio.h>

#include <conio.h>  
void main()  
{  
      
    int i, j, rows, k = 0;  
    printf (" Enter a number to define the rows: \n");  
    scanf ("%d", &rows);   
      
    for ( i =1; i <= rows; i++)  
    {  
        for ( j = 1; j <= rows - i; j++)  
        {  
            printf ("  ");   
        }  
         
        for ( k = 1; k <= ( 2 * i - 1); k++)  
        {  
            printf ("* ");  
        }  
        printf ("\n");  
    }  
    getch();  
}


Youtube Video



Sunday, 5 September 2021

How to add two numbers in c++ .............

  #include<iostream>

 using namespace std;

 

 int main(){

 	

 	int a, b, sum;

 	

 	cout<<"Enter Your First Value: ";

 	cin>>a;

 	

 	cout<<"Enter Your Second Value: ";

 	cin>>b;

 	

 	sum=a+b;

 	

 	cout<<"Sum of numbers are ..."<<sum;

 	

 	return 0;

 }





How to add to number using c .......

 #include<stdio.h>

 
int main(){

	int a,b,c;

	printf("Enter value of a: ");

	scanf("%d",&a);

	printf("Enter value of b: ");

	scanf("%d",&b);

	c=a+b;

	printf("sum of your numbers: %d",c);

	return 0;

}





Youtube video s

Wednesday, 5 August 2020

SI and CI using Vb6

 
Private Sub Command1_Click()
Dim P As Integer, R As Integer, T As Integer
Dim SI
P = Val(Text1.Text)
R = Val(Text2.Text)
T = Val(Text3.Text)
SI = (P * R * T) / 100

Text4.Text = SI
End Sub

Private Sub Command2_Click()
Dim P, R, T As Integer
Dim CI
P = Val(Text1.Text)
R = Val(Text2.Text)
T = Val(Text3.Text)
CI = (P * (1 + R / 100) ^ T) - P
Text4.Text = CI

End Sub
Output

Program to check whether the reverse string is a palindrome

  # include < stdio.h > # include < string.h > int main ( ) { //declare variables char str1 [ 30 ] ; int i , len...