convert c program to assembly language online
gcc –S program.cpp
convert c program to assembly language online
gcc –S program.cpp
convert c program to assembly language online
/**
* C program to print hollow mirrored right triangle star pattern
*/
#include <stdio.h>
int main()
{
int i, j, rows;
/* Input rows from user */
printf("Enter number of rows : ");
scanf("%d", &rows);
/* Iterate through rows */
for(i=1; i<=rows; i++)
{
/* Print trailing spaces */
for(j=i; j<rows; j++)
{
printf(" ");
}
/* Print hollow right triangle */
for(j=1; j<=i; j++)
{
/*
* Print star for last row(i==row),
* first column(j==1) and
* last column(j==i).
*/
if(i==rows || j==1 || j==i)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
return 0;
}
Output
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us