0

a c++ program the insert new element at the end of a linked list, and allow a user to search for specific item in the linked list.

pseudoode for insrtion of new elements at the end of the list

3
Contributors
2
Replies
22
Views
2 Years
Discussion Span
Last Post by Zawar_1
0

Please don't ask us to do your homework for you. Write the code and then post it with your errors or problems here and then we can help.

-2
#include <iostream>

using namespace std;
int tri(int n)
{
    for (int a=1;a<=n;a++)
    {
        int b,c,d,e;
        for(int i=1;i<=n;i++)
        {
            b=n;
            c=b+1;
            d=n*c;
            e=d/2;
        return e;

        }


    }






}
int main()
{
    int a;
    cout << "u want the eries upto  ?" << endl;
    cin>>a;
    cout <<"the series is :  ";
    for (int s=1;s<=a;s++)
    {
        cout<<tri(a)<<" , ";

    }




}

i want that this programm should print the series upto that number which the user enter

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.