Skip to main content

Printing reverse matrix In C

Printing reverse matrix In C




#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int n,j;
int maxstars=n;
int pspace=maxstars/2;
int phieght=maxstars-pspace;
int i,k,l;
for(i=phieght;i>=1;i--)
{
for(j=pspace;j>=1;j--)
{
printf(" ");
}
for(k=1;k<=maxstars;k++)
{
printf("*");






Comments

Popular posts from this blog

C++ Program Finding The Absolute Value

#include<iostream> using namespace std; int main() { cout<<" enter any number"; cin>>num; if(num>0) { cout<<"The absolute value of number is:"<< num; } else { cout<<"The absolute value of number is :"<< -(num); } return 0; } OUTPUT Enter Any number: 2 The absolute value of number is 2