English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

write a c program to print your name ten times
using

1.for loop
2.while loop
3.do while loop

i dont need explanation

write it like
#include stdio.h
..........................
..........................
..........................
}

2006-08-03 03:06:29 · 2 answers · asked by Anonymous in Computers & Internet Other - Computers

2 answers

#include stdio.h

void main()
{
//Put name in a variable so we don't have to type it out each time
string name = "Your Name Here";

//For...
int i=0;
for (i, i<10, i++)
{
printf(name);
}

//While
int a=0;
while(a<10)
{
printf(name);
a++;
}

//Do while

int x=0;
do
{
printf(name);
x+=;
}
while
{
x<10
}
}

2006-08-03 03:12:38 · answer #1 · answered by Anonymous · 0 0

For shame. All this information is in your text, and you are too lazy to read and do the work yourself. I never learned "c" language, but years ago I learned ASCII Basic Programming. This is very similiar. I would guess that within a couple of hours, studying the text even I could do this.
Humpf! Having someone else do your work for you is like, cheating!!

2006-08-03 10:22:02 · answer #2 · answered by rb_cubed 6 · 0 0

fedest.com, questions and answers