Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners turbo C Question 4.

Have Programming Question? Ask it here!
 
 
 


Arijit Maji
turbo C Question 4.
2 Answer(s)      2 years and 6 months ago
Posted in : Java Beginners


Possible to print the following (Using for Loops): 1. * **




2.*


* ** *

  1. * * *


Advertisement
View Answers

February 25, 2012 at 1:41 PM


specify the format properly.



February 27, 2012 at 1:22 PM


*
**
***
****
*****

#include <stdio.h>
#include <conio.h>

  void main(){
       for(int i=1;i<=5;i++){
           for(int j=1;j<=i;j++){
             printf("*");
           }
           printf("\n");
       }

   }



*****
****
***
**
*

#include <stdio.h>
#include <conio.h>

  void main(){
      for(int i=5;i>=1;i--){
           for(int j=1;j<=i;j++){
              printf("*");
           }
            printf("\n");
       }
   }



    *
   **
  ***
 ****
*****

#include <stdio.h>
#include <conio.h>

  void main(){
       for(int i=1;i<=5;i++){
          for (int j = 0; j < 5-i; j++){
          printf(" ");
       }
           for(int j=1;j<=i;j++){
          printf("*");
           }
          printf("\n");
       }
   }


*****
 ****
  ***
   **
    *

#include <stdio.h>
#include <conio.h>

  void main(){
          for(int i=5;i>=1;i--){
               for (int j = 0; j < 5-i; j++){
               printf(" ");
             }
           for(int j=1;j<=i;j++){
              printf("*");
           }
             printf("\n");
       }
   }


Related Tutorials/Questions & Answers:
turbo C Question 4.
turbo C Question 4.  Possible to print the following (Using for Loops): 1. * ** 2.* * ** * * * *   specify the format properly
turbo C Question 4.
turbo C Question 4.  Possible to print the following (Using for Loops): 1. * ** 2.* * ** * * * *   specify the format properly
Advertisements
turbo C Question 6.
turbo C Question 6.  Explain call by value and call by reference with easy examples
turbo C Question 5.
turbo C Question 5.  is it possible to print "", 1st line (5 times),2nd line *(4 times),3rd line *(3 times),4th line *(2 times) & 5th line *(1 times) with Align Right. and also reverse order as 1,2,3,4,5 (but right aline
turbo c pre-increment question
turbo c pre-increment question  Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times
turbo C prog.
turbo C prog.  Is is possible print ASCII value of a alphabets using turbo C prog
turbo C prog.
turbo C prog.  Is it possible to print ASCII value A to Z with out...;#include<stdio.h> #include<conio.h> void main() { for(char c='A';c<='Z';c++){ printf("\nASCII of %c is %i\n", a, a); } getch(); } C
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)
Can u print in turbo C  Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times
turbo C prog. Q3
turbo C prog. Q3  What is the difference between if and ladder... } Example of ladder if: #include <stdio.h> main() { int a,b,c; printf("enter values for a,b,c"); scanf("%d%d%d",&a,&b,&c); if(a>
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)
Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print ++a in the same printf() command ten times)  Can u print in turbo c 9 8 7 6 5 4 3 2 1 0 using pre increment operator Only use print
Conditional Statement in Turbo C
Conditional Statement in Turbo C   Write a program that computes and assesses the tuition fee of the students in one trimester, based on the given mode of payment below: Plan (Key) Discount (-) or Interest (+) Cash (1) 10
Conditional Statement in Turbo C
Conditional Statement in Turbo C   Write a program that computes and assesses the tuition fee of the students in one trimester, based on the given mode of payment below: Plan (Key) Discount (-) or Interest (+) Cash (1) 10
(ForPro) turbo C prog. Q4
(ForPro) turbo C prog. Q4  I need to learn some easy foxpro program.. for example sum,interchange, loop etc
how to get following answer in turbo c program
how to get following answer in turbo c program  input 123456789 output 1 2 3 4 5 6 7 8 9
C# question
Create a Solution by name Bank with Classes Account.cs, SavingsAccount.cs and savingsTest.cs to Demonstrate Abstract Classes in C#  1st question... and savingsTest.cs to Demonstrate Abstract Classes in C
C# question
C# question  Write a program in C# to create 3*4 matrix and show the sum of diagonal values
C# question
C# question  Write a program in C# to create 3*4 matrix and show the sum of diagonal values
question for c++
question for c++   write Program to swap between two numbers if first number is greater than second number and total of two numbers greater than 10
C# question
C# question  Explain enumeration base types in C
C# question
C# question  In C#, string is a class or primitive type. Explain
question for c++
question for c++   write Program to swap between two numbers if first number is greater than second number and total of two numbers greater than 10   ?¨?±???§???¬ ??????¨?§?¯????© ?¨
c question
c question  How to convert decimal numbers into binary digits without using pow function in c language
C# question
C# question  How can we call method pass by reference in C
C/C++/JAVA Question on function
C/C++/JAVA Question on function  "Write a function to find out common... other data type also.â?? Question can be solved in C,C++ or JAVA. (Recommneded - C
4 C's of Marketing Mix
be said that 4 C's concept is a consumer-oriented version of 4 P's concept. The 4 C's of marketing mix include: 1)Consumer: The 'Product' of 4P...As 4 P's of marketing mix was basically a product oriented model, Robert F
C++ question 3
C++ question - add the two matrices and display the elements of resultant....   C sum of two matrices The given code allow the user to enter...; #include <conio.h> void main() { int m, n, c, d, first[10][10], second[10
C++ Question 2
C++ Triangle and Rectangle - calculate area of Triangle and rectangle using data members from base class  2.create class. Shape accepts two values (Data Type: Double). Create two derived classes Triangle and Rectangle ; calculate
C Program Question - Development process
C Program Question  How i can calulate sum of First digit and last... can calculate in C Program?   Hi Friend, Try the following code...; } first=list[0]; last=list[4]; sum=first+last
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
c++
c++  i use turbo c++...i want to change the background color...what is the command for it and the header file used
please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu  1... clock to measure the running time c) Use several input (eg: N = 100 , N = 1000... structure and print them on to console screen. 4) The common error message which
please help me to answers this question about C++.....huuhuhuhu
please help me to answers this question about C++.....huuhuhuhu  1... clock to measure the running time c) Use several input (eg: N = 100 , N = 1000... structure and print them on to console screen. 4) The common error message which
C/C++ - Development process
C/C++  I need the code for playing the backgammon game using C/C++.Im using turbo C. I`ve already design the board.I badly need the code for playing this game
C++
C++  . Consider the definition of the following class: class CC { public: CC(); //Line 1 CC(int); //Line 2 CC(int, int); //Line 3 CC(double, int); //Line 4 . . . private: int u; double v
c++
c++  Write the definition of the class dayType that implements... on an object of type dayType: a. Set the day. b. Print the day. c. Return the day... is Monday and we add 4 days, the day to be returned is Friday. Similarly
c++
c++  Write a console based C++ program that reads student information... on his/her ID 4) Display all Passed Student Names & GPAs; (Pass means GPA >... name with the minimum GPA 7) Display Student GPAs as Letter Grades (A, B, C, D
Junit 4
Junit 4  Hello, I need someone to help me with the generic implementation of the toString method testing using Junit 4
C,C++
C,C++  Sir, 100&30 gives output 4 in C++ and 100|30 gives output 116 How & and | gives output 4 and 116
Integrating spring 4 with hibernate 4
Integrating spring 4 with hibernate 4  Hi, How to integrate spring 4 with hibernate 4 backed with MySQL database? Thanks   Hi, Spring 4 framework provides the tools and apis for integrating the Hibernate 4. Check
c#
c#  how to find out the size of the BMP image in C
C++
C++  How can i write this in dev c
C++
C++  How can i write this in dev c
c++
c++   Assume vector "x" of integers with values of 7, 3, 5, 8, 1, 9, 0, 4, 2, 6. Second, assume integer variables "a," "b" and "y" with values of 3, x.size()-5 and 0, respectively. Third, assume a for-loop header which: 3.1
c++
c++  use a prgrm as an example to xplain-: a)class b)object c)message d)cope resolution operator
CHECK WHICH NO IS GREATER IN 4 NO'S
CHECK WHICH NO IS GREATER IN 4 NO'S  MAKE A PROGRAM TO CHECK WHICH NO. IS GREATER IN 4 NO'S IN JAVA ???   **class u... as[]) { int a,b,c,d; a=Integer.parseInt(as[0
c#
c#  how to find out the size of the BMP image
c++
c++  write a programme that calculates the area and circumference of a rectangle
C++
C++  dear sir How to create windows form application for login screen using C++? USER Name -TESTADMIN Password -testuser
C++
C++  differenciate btw.-a)local & public variables b)pre-defined & user defined functions c)fnctn prototype,defination & fnctn code.use code examples
Advertisements
 

 

 

DMCA.com