EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / C-Program for rectangular pyramid..code required

C-Program for rectangular pyramid..code required

|

Miscellaneous › Others › C-Program for rectangular pyramid..code required

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 9 months ago by doraemon.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 12, 2013 at 3:49 am #2398
    Mrityunjoy
    Participant

    hello,

    i’m a begineer in learning c.i have completed “nested loop” and “arrays”. please help me to make the following structure with comments in program.

     

       a b b b

       b a b b

       b b a b

       b b b a

     

    thank you in advance.

    May 14, 2013 at 12:38 pm #9746
    doraemon
    Participant

    Here loop to generate pattern

    for(i=0;i<4;i++)
    {
    for(j=0;j<4;j++)
    {
    if(i==j)
    {
    printf(“a”);
    }
    else
    {
    printf(“b”);
    }
    }
    printf(“n”);
    }

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Pnp transistor query March 5, 2026
  • H bridge current direction logic March 5, 2026
  • Sine wave oscillator schematic please? March 5, 2026
  • LM350K variable power supply March 5, 2026
  • Hello & a Request: Recommendations for obsolete Panasonic filter Capacitors. March 5, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise