Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

parkside's triangle..

create a program like this..

enter the size: 6
enter the seed: 1

output:

1
23
456
7891
23456
789123

sample2:

enter the size: 5
enter the seed: 3

output:

3
45
678
9123
45678

parkside should not exceed 10 while its seed should only be
not more than 9..

Answer Posted / dally

/////********For first question**********/
#include<stdio.h>
int main()
{
int n,i,j,k=1;

printf("Enter values for n\n") ;
scanf("%d",&n);
for(i=0;i<=n;i++)
{
for(j=0;j<=i;j++)
printf("%d\n",k);
printf("\n");
k++;
}
}
IT WILL PRINT
1
2 3
4 5 6
7 8 9 10

********************************
For second question
********************************

#include<stdio.h>
int main()
{
int i,j,n,k=3;

printf("Enter value for n\n") ;
scanf("%d",&n);

for(i=0;i<=n;i++)
{
for(j=0;j<=i;j++){
printf("%d",k);
k++;
}
printf("\n");
if(k == 10)
k=1;
}

}
IT WILL PRINT
3
45
678
9123
45678

Is This Answer Correct ?    1 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is realloc in c?

1100


What are the features of the c language?

1085


Explain what are the different file extensions involved when programming in c?

1110


Explain what is the difference between the expression '++a' and 'a++'?

1214


What are two dimensional arrays alternatively called as?

1185


What is the size of enum in c?

1119


What is the use of #define preprocessor in c?

1079


writ a program to compare using strcmp VIVA and viva with its output.

2024


Can you please explain the difference between syntax vs logical error?

1190


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

2221


How to compare array with pointer in c?

1104


What is time null in c?

1072


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

1159


What is preprocessor with example?

1061


What is modeling?

1052