answersLogoWhite

0


Best Answer

#include<stdio.h>

int main()

{

int i;

for(i=0; i<10; i++)

{

printf("Hello Sok Sabay\n");

}

}

User Avatar

Wiki User

16y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

#include<stdio.h>

#include<conio.h>

int main(){

int i;

for(i=0;i<10;i++){

printf("hello \n");

}

return 0;

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write algorithm of Program in C to print hello 10 times?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do functions help you to reuse code in a program?

Functions hold code, which means anything that happens within a function can be "called" later on. Allowing the programmer to save time, and ensuring he doesn't have to re-write code. Example: Instead of writing "Hello" 10 times, I made a function that said print("hello") 5 times, then "Called" the function twice. def helloFiveTimes(): print("Hello") print("Hello") print("Hello") print("Hello") print("Hello") return helloFiveTimes() helloFiveTimes()


How many times will the program will print Language?

Without seeing the program, I can only say: 'zero or more times'


How do you write a C program to print your name one hundred times?

Duhh.. printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); Just kidding. Just loop the printing. int x = 0; for(x = 0; x&lt;11; x++) { printf("hello "); } and if you want each "hello" to be in a new line, use this: printf("hello\n");


How do you print hello world 100 times in c plus plus using while statment?

C++ Hello World Example:// this is a single line comment /* this is a multi-line comment */ #include // header file needed to print using namespace std; // instead of having to write std::cout // the main function is where the program begins execution int main() { // print Hello world. and a new line cout


How do you write main menu pseudo code?

==== '----------------------------------------------- '*** PROGRAM: Main Menu ' LANGUAGE: QBASIC: VERSION: QB64 '----------------------------------------------- '------------------------------------------ '*** Global variable declarations list... '------------------------------------------ userKeyPress$="" '----------------------- '*** Main Program... '----------------------- DO 'this is a menu driven program... GOSUB clearScreen GOSUB printMainMenuTitleHeading GOSUB printMainMenuOptionsList GOSUB printMainMenuInstructionsHeading GOSUB printMainMenuUserInstructions GOSUB awaitUserKeyPress GOSUB checkUserKeyPress LOOP UNTIL UCASE$(userKeyPress$) = "Q" '...UCASE converts lower case to upper END '...END of program/halt program code execution '---------------------- '*** Sub-routines... '---------------------- clearScreen: CLS '...(CL)ear the output (S)creen RETURN printMainMenuTitleHeading: PRINT "MAIN MENU" PRINT "========" RETURN printMainMenuOptionsList: PRINT "Hit key: &lt;1&gt; for Program 1: 12 X Tables Square" PRINT "Hit key: &lt;2&gt; for Program 2: Select a times tables to print out" PRINT PRINT "Hit key: &lt;Q&gt; to Quit!" PRINT RETURN printMainMenuInstructionsHeading: PRINT "USER INSTRUCTIONS" PRINT "==============" RETURN printMainMenuUserInstructions: PRINT "In order to select from the above Main Menu options list..." PRINT PRINT "First, chose the type of program you wish to run..." PRINT "by, carefully, reading it's description." PRINT PRINT "Then, hit a corresponding single number/letter key, either: '1'/'2';" PRINT "or, alternatively, hit key: 'Q' to Quit!" PRINT PRINT "-Thank you!" RETURN awaitUserKeyPress: DO '...keep looping until when user presses any key... userKeyPress$ = INKEY$ '...store any IN-coming KEY press LOOP UNTIL userKeyPress$ &lt;&gt; "" RETURN checkUserKeyPress: IF userKeyPress$ = "1" THEN GOSUB program1 '...GO to named SUB-routine IF userKeyPress$ = "2" THEN GOSUB program2 '...GO to named SUB-routine RETURN program1: GOSUB clearScreen PRINT "PROGRAM 1" '(...program 1/code goes here...) GOSUB awaitUserKeyPress RETURN program2: GOSUB clearScreen PRINT "PROGRAM 2" '(...program 2/code goes here...) GOSUB awaitUserKeyPress RETURN

Related questions

How do functions help you to reuse code in a program?

Functions hold code, which means anything that happens within a function can be "called" later on. Allowing the programmer to save time, and ensuring he doesn't have to re-write code. Example: Instead of writing "Hello" 10 times, I made a function that said print("hello") 5 times, then "Called" the function twice. def helloFiveTimes(): print("Hello") print("Hello") print("Hello") print("Hello") print("Hello") return helloFiveTimes() helloFiveTimes()


How many times will the program will print Language?

Without seeing the program, I can only say: 'zero or more times'


How do you write a C program to print your name one hundred times?

Duhh.. printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); printf("hello "); Just kidding. Just loop the printing. int x = 0; for(x = 0; x&lt;11; x++) { printf("hello "); } and if you want each "hello" to be in a new line, use this: printf("hello\n");


How do you print hello world 100 times in c plus plus using while statment?

C++ Hello World Example:// this is a single line comment /* this is a multi-line comment */ #include // header file needed to print using namespace std; // instead of having to write std::cout // the main function is where the program begins execution int main() { // print Hello world. and a new line cout


What does algorithm mean in math?

24 times 21= in algorithm standard


What is forloop?

For loop is utilize to do any specific work for specific number of times For example to print hello on computer screen 10 time we use For (start = 1; end = 10; start++) count&lt;&lt;"hello"; next


How many times does Lionel Ritchie say Hello in Hello?

3 times!


How do you write main menu pseudo code?

==== '----------------------------------------------- '*** PROGRAM: Main Menu ' LANGUAGE: QBASIC: VERSION: QB64 '----------------------------------------------- '------------------------------------------ '*** Global variable declarations list... '------------------------------------------ userKeyPress$="" '----------------------- '*** Main Program... '----------------------- DO 'this is a menu driven program... GOSUB clearScreen GOSUB printMainMenuTitleHeading GOSUB printMainMenuOptionsList GOSUB printMainMenuInstructionsHeading GOSUB printMainMenuUserInstructions GOSUB awaitUserKeyPress GOSUB checkUserKeyPress LOOP UNTIL UCASE$(userKeyPress$) = "Q" '...UCASE converts lower case to upper END '...END of program/halt program code execution '---------------------- '*** Sub-routines... '---------------------- clearScreen: CLS '...(CL)ear the output (S)creen RETURN printMainMenuTitleHeading: PRINT "MAIN MENU" PRINT "========" RETURN printMainMenuOptionsList: PRINT "Hit key: &lt;1&gt; for Program 1: 12 X Tables Square" PRINT "Hit key: &lt;2&gt; for Program 2: Select a times tables to print out" PRINT PRINT "Hit key: &lt;Q&gt; to Quit!" PRINT RETURN printMainMenuInstructionsHeading: PRINT "USER INSTRUCTIONS" PRINT "==============" RETURN printMainMenuUserInstructions: PRINT "In order to select from the above Main Menu options list..." PRINT PRINT "First, chose the type of program you wish to run..." PRINT "by, carefully, reading it's description." PRINT PRINT "Then, hit a corresponding single number/letter key, either: '1'/'2';" PRINT "or, alternatively, hit key: 'Q' to Quit!" PRINT PRINT "-Thank you!" RETURN awaitUserKeyPress: DO '...keep looping until when user presses any key... userKeyPress$ = INKEY$ '...store any IN-coming KEY press LOOP UNTIL userKeyPress$ &lt;&gt; "" RETURN checkUserKeyPress: IF userKeyPress$ = "1" THEN GOSUB program1 '...GO to named SUB-routine IF userKeyPress$ = "2" THEN GOSUB program2 '...GO to named SUB-routine RETURN program1: GOSUB clearScreen PRINT "PROGRAM 1" '(...program 1/code goes here...) GOSUB awaitUserKeyPress RETURN program2: GOSUB clearScreen PRINT "PROGRAM 2" '(...program 2/code goes here...) GOSUB awaitUserKeyPress RETURN


When was Pocahontas Times Print Shop created?

Pocahontas Times Print Shop was created in 1900.


How many times are people allowed to print a coupon?

If you need to print some coupons and are wondering just how many you are allowed to print, I have discovered that the average amount of times to print one particular coupon is twice.


How do you write a c program?

this is what the program says :i want to write a C program which reads in one value, the seed for the random number generator. Your program should then generate 100,000 simulated rolls of a pair of dice. The program should calculate and print the number of times the simulated roll of the dice was a 2, the number of times it was a 7 and the number of times it was a 12. Finally, print out the average (three decimal places) of all of the simulated rolls.Your program must have at least one user defined function called die which creates the roll of one die. This function should return an integer value between 1 and 6 inclusive. It should have no arguments.1- i cant figure out how to calculate how many time does the 2 , 7 , 12 print out .2- how to calculate the number in the 100,000 to be able to calculate the avg.3- i dunno how to create the function in the second part .


What is the relationship between a program and an algorithm?

program is set of instructions or codes that system can only understand and compile where as algorithm is step by step process that system understands easily and user can also understand easily.