program to print this triangle
*
* *
* * *

Answers were Sorted based on User's Feedback



program to print this triangle * * * * * *..

Answer / rajesh

#include<stdio.h>
main()
{
int i,j;
for(i=1;i<=3;i++)
{
for(j=1;j<=i;j++)
printf(""+"*",i,j);
}
}

Is This Answer Correct ?    8 Yes 58 No

program to print this triangle * * * * * *..

Answer / jayasreesampath

#include<stdio.h>
main()
{
int i,j;
for(i=1;i<=3;i++)
{
for(j=1;j<=3;j++)
printf("\n",i,j);
}
}

Is This Answer Correct ?    23 Yes 91 No

Post New Answer

More C++ General Interview Questions

Why seem interrupt handlers as member functions to be impossible?

1 Answers  


What is the function to call to turn an ascii string into a long?

0 Answers  


What is endianness?

0 Answers  


List the merits and demerits of declaring a nested class in C++?

0 Answers  


In C++ cout is: a) object b) class c) something else

11 Answers   Infosys, Lehman Brothers,






Write a C program to calculate the salary of each employee in your company. You need to input the hours worked and the hourly rate. The company pays 1.5 times the hourly rate for all hours worked in excess of 48 hours. Use the formulas below to calculate the salary: if employee worked less than 48 hours salary = hours * rate; if employee worked more than 48 hours salary = 48.0 * rate + ( hours &#8722; 48.0 ) * rate * 1.5; You are required to use a loop to produce the sample output as given below.

1 Answers  


Can the creation of operator** is allowed to perform the to-the-power-of operations?

0 Answers  


How are Structure passing and returning implemented by the compiler?

0 Answers  


What is Memory Alignment?

2 Answers   TCS,


What are abstract data types in c++?

0 Answers  


total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.

0 Answers  


What is setbase c++?

0 Answers  


Categories