CodeMarshal Solution তারার পিরামিড (Pyramid of Stars) - Solution in C Programming
CodeMarshal Online Judge Solution তারার পিরামিড (Pyramid of Stars)
CodeMarshal Main Problem Link - https://algo.codemarshal.org/problems/556df1de3bbbaa0300a964d5
Problem Name: CodeMarshal Problem তারার পিরামিড (Pyramid of Stars)
Problem Number : CodeMarshal Problem তারার পিরামিড (Pyramid of Stars)
Online Judge : CodeMarshal Online Judge Solution
Solution Language : C
CodeMarshal Solution তারার পিরামিড (Pyramid of Stars) Code in C:
#include<stdio.h> int main () { int i, n, number; scanf("%d", &n); for(i = 1; i <= n; i++) { int testNo; scanf("%d", &testNo); printf("Case %d:\n", i); int j, k; //Right Increasing Pyramid for(j = 1; j <= testNo; j++) { for(k = 1; k<= j; k++) { printf("*"); } printf("\n"); } //Right Decreasing Pyramid (Opposite) for(j = testNo; j > 1; j--) { int temp_TestNo = j; for(k = temp_TestNo; temp_TestNo > 1; temp_TestNo--,k--) { printf("*"); } printf("\n"); } } return 0; }
Tag : CodeMarshal Solution in C, তারার পিরামিড (Pyramid of Stars) Solution of CodeMarshal, Pyramid of stars solution in codemarshal, CodeMarshal Code Solution
No comments:
Post a Comment