koushik sarkar


{ City } uttar dinajpur
< Country > india
* Profession * self
User No # 33952
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 19
Users Marked my Answers as Wrong # 13
Questions / { koushik sarkar }
Questions Answers Category Views Company eMail




Answers / { koushik sarkar }

Question { 14187 }

write a 'c' program to sum the number of integer values


Answer

#include
#include
void main()
{
int a,b;
clrscr();
printf("Enter a integer no:-"); scanf("%d",&a);
printf("Enter a Integer no:-"); scanf("%d",&b);
printf("Sum= %d",a+b);
getch();
}

Is This Answer Correct ?    13 Yes 12 No

Question { Huawei, 6742 }

Program to output as below formate:
1
2 3
4 5 6
7 8 9 10


Answer

#include
#include
void main()
{
int i=1,j,k;
clrscr();
for(j=0;j<4;j++)
{
for(k=0;k<=j;k++)
{
printf("%d "",i);
i++;
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    6 Yes 1 No