We use cookies to give you the best experience possible. By continuing we’ll assume you’re on board with our cookie policy

Freedom of Speech and Expression in Malaysia

Categories Freedom, Freedom Of Speech

Speech, Pages 2 (283 words)

viewsViews

viewsViews

Speech, Pages 2 (283 words)

Write a program to add of number in c programming. The output of the program should be like the figure below: Enter an integer
98
Sum of digits of entered number = 17

Enter an integer
98
Sum of digits of entered number = 17

#include<stdio.h>
Int main ( )
{
Int a,b; /*variable declaration*/
Printf(“insert your integer number n”); /*insert the integer number that is 98*/
Scanf(“%d”,&a); /* the input percent d,mpersand sign and variablename */

Int y=17; /*assigning the variable value that is yis equal to 17*/

While(y<=17); /*y is is less then or equal to 17*/
{
Printf(“the sum is %dn”,y); /*display the output of sum y*/ }

Return 0; /*returning*/
}

introduction
loop structure

loop is know as a group of instruction be executed repeatedly, until a logical condition has been satisfied.

Don't waste time.

Get a verified writer to help you with Freedom of Speech and Expression in Malaysia

HIRE verified writer

$35.80 for a 2-page paper

looping statements are used to
control program flow. There are three major loop statements in the C programming language.

3 major loop :
* for loop
* while loop
* do…while loop

For loop.

For loop is the fundamental looping statement in C. It is often used for situations in which you want to execute a specific task number of times.

While loop

In the while loop, the body of the loop is executed as long as the expression is true. And when the expression become false, program control passes to the line that follows the loop.

Do.. while loop

This loop structure is similar to the while loop. The do while loop checks its condition at the end of the loop. This means that the do while loop will always excute atleast once.

Top writers

Prof. Clara

shield Verified writer

starstarstarstarstar 5 (345)

Allan Brooks

shield Verified writer

starstarstarstarstar 5 (893)

Professor P

shield Verified writer

starstarstarstarstar 4.9 (345)

HIRE verified writer

SPG0412

NAME:NURUL EKA SHAHFIKA BINTI RAZI
ID:PIC127060
MISS:MISS NURUL RADFIZA BINTI MUHAMAD RASHID

Cite this essay

Freedom of Speech and Expression in Malaysia. (2016, Apr 02). Retrieved from https://studymoose.com/freedom-of-speech-and-expression-in-malaysia-essay

Stay safe, stay original

It’s fast
It’s safe
It’s FREE
check your essay for plagiarism

Not Finding What You Need?

Search for essay samples now

image

Your Answer is very helpful for Us
Thank you a lot!