Abdullah  Kozey

Abdullah Kozey

1617707280

C Program to Create A Rocket using Graphics

In this article, we will discuss how to draw the Rocket using Graphics.

Approach:

  • Draw a straight line using the line() function that will act as the Ground Outline.
  • Below the above line drawn, fill it with the color green using two functions setfillstyle() and floodfill().
  • Create a rectangle using the rectangle() function and color it brown that will act as the rocket Body.
  • Create the total four triangles by using the line() function which will act as the wing of the rocket to make it appear more attractive.
  • Among them, two will be situated at the two sides of the upper part of the rocket & the lower part of the rocket.
  • Color all the wings with blue color.
  • Create a triangle using the line() that will act as the head of the rocket. and color it white.

#c #c programs #c-graphics

What is GEEK

Buddha Community

C Program to Create A Rocket using Graphics
Abdullah  Kozey

Abdullah Kozey

1617707280

C Program to Create A Rocket using Graphics

In this article, we will discuss how to draw the Rocket using Graphics.

Approach:

  • Draw a straight line using the line() function that will act as the Ground Outline.
  • Below the above line drawn, fill it with the color green using two functions setfillstyle() and floodfill().
  • Create a rectangle using the rectangle() function and color it brown that will act as the rocket Body.
  • Create the total four triangles by using the line() function which will act as the wing of the rocket to make it appear more attractive.
  • Among them, two will be situated at the two sides of the upper part of the rocket & the lower part of the rocket.
  • Color all the wings with blue color.
  • Create a triangle using the line() that will act as the head of the rocket. and color it white.

#c #c programs #c-graphics

Abdullah  Kozey

Abdullah Kozey

1617695702

Learning C: Input and Output and Two Program Templates

Before I get too deep into C, I need to show you how to get data into and out of your programs. Using assignment for data gets old after a while and you want to be able to have users enter their own data. And you definitely need to be able to see what happens to your data in a program so learning how to display data to the screen is important and necessary.

Besides demonstrating how to perform input and output in C, I will also be demonstrating two templates that are related to those topics — Prompt, Then Read and Input, Process, Output (IPO). The IPO template, in particular, is important because practically every C program you write will use this template.

When I talk about input and output in C, I’ll use the terms standard input and standard output. These terms refer to the default input and output devices on your computer. The standard input device is the keyboard. The standard output device is the computer’s monitor or screen. I will only use the terms input and output and when I use those terms I’m referring to standard input and standard output. If I want to refer to a different device for input and/or output, I’ll use the specific term for that device.

#c-programming-language #c-programming #c-program #c-programming-help

Ari  Bogisich

Ari Bogisich

1589821800

WASI Development Toolchain for C/C++

We realized that compiling already existing C/C++ projects to WASI was much more challenging than we expected. This is because of two main reasons:

  1. It’s not trivial to install and use the WASI SDK
  2. It’s quite hard to port existing projects to WASI as it requires a tighter integration with all configuration and make tools

Inspired by these challenges we have been working non-stop on improving the tooling so it’s easier for anyone to use and adopt WebAssembly and WASI!

#programming #c-programming #c #c# #c++

Represent Tree using graphics in C/C++

Prerequisite: graphics.hHow to include graphics.h?

In C/C++ there is graphics.h header file which is used to create the object like line, circle, etc.

Given an array arr[] of N integers, the task is to write C++ program to create the Tree using graphics.h.

Approach: To run the program we have the include the below header file:

#include 

We will create a Tree with the help below functions:

  1. setcolor(color): This function present in graphic.h header file which is used to set the current drawing color to the new color.
  2. floodfill(pattern, color): function is used to fill an enclosed area. The current fill pattern and fill color is used to fill the area.
  3. circle(x, y, radius): The header file graphics.h contains circle() function which draws a circle with center at (x, y) and given radius.
  4. outtextxy(): The header file graphics.h contains outtextxy() function which displays the text or string at a specified point (x, y) on the screen.

#computer-graphics #trees #c #c++ #cplusplus #programming-c

Anil  Sakhiya

Anil Sakhiya

1607339640

C programming for Beginners | Learn C Programming | C Language

C Language is an evergreen language and is used widely across different industries, This C programming is a must for students and working professionals to become a great Software Engineer especially when they are working in Software Development Domain. Great Learning brings you this live session on “Introduction to C”. In this live session, we will be covering major concepts in C Programming such as Different Variables, Different Data Types that are being used, its Operators, Flow control statements, Structure, and lot more.

#c #programming #developer #c-programming #c-language