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

maxXxa

Member
Apr 14, 2010
341
5
0
hmm ayeth prashnayak... mata * ** *** **** ***** widihata C++ walin stars print karanna oone...

mama
int i;
for(i=1;i<=5;i++)
{
cout <<"*" <<" ";
}
cout<<endl;
}

kiyala dunna ethakota print wenne * * * * * kiyalane ...
ane help
 

cyber22118

Member
Jan 30, 2010
3,569
99
0
Not Far From U
class demo{

public static void main(String args[]){
int i;
int x;

for(i=0;i<6;i++){
System.out.print(" ");
for(x=0;x<i;x++){

System.out.print("*");

}
}
}
}

this is java.. meeta wadaa podi code ekak liyanna puluwan.. mama movie ekak bala bala innee.. oyaa meeka hadaaganna.
 

pga

Well-known member
  • Oct 4, 2006
    3,965
    914
    113
    hmm ayeth prashnayak... mata * ** *** **** ***** widihata C++ walin stars print karanna oone...

    mama
    int i;
    for(i=1;i<=5;i++)
    {
    cout <<"*" <<" ";
    }
    cout<<endl;
    }

    kiyala dunna ethakota print wenne * * * * * kiyalane ...
    ane help

    int i,j;
    for(i=1;i<=5;i++)
    {
    for (j=0;j<i;j++)
    {
    cout <<"*" <<" ";
    }
    cout<<endl;
    }
     

    Core

    Member
    Jan 23, 2010
    3,120
    195
    0
    Milky Way/Local Cluster/Local Sol/Earth
    #include <string>
    #include <iostream>

    int main(){

    int i,j,input_val;
    std::string _star,input,_temp;

    std::cout << "type the max value that you want to reach" << std::endl << "\n" ;
    std::getline(std::cin,input);
    input_val = ::atoi(input.c_str()); //in here atoi means ato integer

    for(i=0;i<=input_val ;i++)
    {
    _star= " ";
    std::cout << _star;

    for(j=1;j<=i;j++)
    {
    _temp = "*";
    std::cout << _temp;
    }
    }

    std::cout << "\n type any key to exit" << std::endl << "\n" ;
    std::getline(std::cin,input);

    }


    Here you go buddy ;)
    next time do your home work yourself.

    Notice in here you can go up to
    Integer.Max value it means you can get any amount of stars

     
    Last edited:

    cyber22118

    Member
    Jan 30, 2010
    3,569
    99
    0
    Not Far From U
    #include <string>
    #include <iostream>

    int main(){

    int i,j,input_val;
    std::string _star,input,_temp;

    std::cout << "type the max value that you want to reach" << std::endl << "\n" ;
    std::getline(std::cin,input);
    input_val = ::atoi(input.c_str()); //in here atoi means ato integer

    for(i=0;i<=input_val ;i++)
    {
    _star= " ";
    std::cout << _star;

    for(j=1;j<=i;j++)
    {
    _temp = "*";
    std::cout << _temp;
    }
    }

    std::cout << "\n type any key to exit" << std::endl << "\n" ;
    std::getline(std::cin,input);

    }


    Here you go buddy ;)
    next time do your home work yourself.

    Notice in here you can go up to
    Integer.Max value it means you can get any amount of stars


    muta ooni missile ekak launch karanne nemei .. * ** *** **** ***** kiyalaa print karanna witharai....:)
     

    maxXxa

    Member
    Apr 14, 2010
    341
    5
    0
    #include <string>
    #include <iostream>

    int main(){

    int i,j,input_val;
    std::string _star,input,_temp;

    std::cout << "type the max value that you want to reach" << std::endl << "\n" ;
    std::getline(std::cin,input);
    input_val = ::atoi(input.c_str()); //in here atoi means ato integer

    for(i=0;i<=input_val ;i++)
    {
    _star= " ";
    std::cout << _star;

    for(j=1;j<=i;j++)
    {
    _temp = "*";
    std::cout << _temp;
    }
    }

    std::cout << "\n type any key to exit" << std::endl << "\n" ;
    std::getline(std::cin,input);

    }


    Here you go buddy ;)
    next time do your home work yourself.

    Notice in here you can go up to
    Integer.Max value it means you can get any amount of stars

    hehe ok btw thnxx machn...:)