answersLogoWhite

0

1 22 333 4444 Any text editor is usable for that.

1 22 333 4444 But if your question was about printing this sequence for nth term, then:

#include

#include

void main()

{

int n,i,j;

clrscr();

printf("Enter the last limit\n");

scanf("%d",&n);

for(i=1;i<=n;i++)

{

for(j=1;j<=i;j++)

{

printf("%d",i);

}

}scanf(" ");

getch();

}

Hey look the above code will print out the series up-to the nth limit which is inputed from the user.

If u use only puts() then u have limitation, i.e. u can't print the series up-to nth term in a normal way and generally this program appears in series up-to nth term.

Thank u.

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

ReneRene
Change my mind. I dare you.
Chat with Rene
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach
More answers

for (int i=1;i<6;i++) {

for (int k=0;k<i;k++)

print(i);

printnewline();

}

In PhP you would write something lime this;

<html>

<head>

<title>Exercise-2>

</head>

<body>

<?

{

for ($count =1; $count <10; $count++)

{

for ($newcount =0; $newcount<$count; $newcount++)

{

$answer = "$count<BR>";

{

echo "$answer";

}

}

}

}

?>

</body>

</html>

User Avatar

Wiki User

14y ago
User Avatar

#include<stdio.h>

int main()

{

int i=1,j,n;

printf("enter how many values\n"); //take input as "6"//

scanf("%d",&n);

while(n!=i)

{

for(j=1;j<=i;j++)

printf("%d",i);

printf(" ");

i++;

}

return 0;

}

User Avatar

Wiki User

13y ago
User Avatar

i dont know dear please give me ans of this problem

1

2 2

3 3 3

4 4 4 4

5 5 5 5 5

User Avatar

Wiki User

12y ago
User Avatar

Add your answer:

Earn +20 pts
Q: 1 22 333 4444 how to create c program?
Write your answer...
Submit
Still have questions?
magnify glass
imp