Program to print 0 to 9 in cross order
Answers were Sorted based on User's Feedback
Answer / james
#include<iostream.h>
int main()
{
for(int i=0;i<=9;i++)
{
for (int j = 0; j <=i; j++)
cout << " ";
cout << i << endl;
}
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / aakash dang
#include<iostream.h>
#include<conio.h>
void main()
{
int x,y;
x=1,y=1;
for(int i=0;i<=9;i++)
{
cout<<i;
gotoxy(x,y);
x++;
y++;
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / kalyan chukka
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,j;
clrscr();
for(i=0;i<=9;i++)
{
for(j=1;j<=i;j++)
{
printf(" ");
}
printf("%d\n ",i);
}
getch();
}
Check in windows Environment
| Is This Answer Correct ? | 0 Yes | 4 No |
Can abstract class have normal methods?
Can an interface inherit a class?
what is inline function?
what is the difference between <stdio.h>and "stdio.h"?
to find out the minimum of two integer number of two different classes using friend function
WHAT IS THE ACTUAL DEFINATION OF OBJECT AND THE CLASS IN ONE SINGLE LINE WHICH THE INTERVIEWER WANT TO LISTEN.
which are the 4 members functions in c++ objects that can either be declared explicitly by programmer or implementation if nt available.
What are generic functions and generic classes?
Is html an oop?
difference between class and object
10 Answers Chandan, IBM, Magic Soft,
Give two or more real cenario of virtual function and vertual object
What is the difference between the c++ & java?