Question: For example: insert 1 5 88 99 7 in a set if 1,5,88,99,7 is given as an input and then pressed Enter.
My code: 

```
#include <bits/stdc++.h>
using namespace std;
set <char> num;
set <char> ::iterator i;
int main()
{
 int a;
 while(a=getchar())
 {

    if(a!='\n')
    {
        if(a!=',')
            num.insert(a);
    }
    else
        break;
}
for(i=num.begin(); i!=num.end(); i++)
    cout<<*i<<endl;
}

```

The output I'm getting:
1
5
7
8
9

Answer: 
```
FirebaseFirestore docRef = FirebaseFirestore.getInstance();
docRef.collection("products").document(shoppingListId)
     .delete()
     .addOnSuccessListener(new OnSuccessListener<Void>() {
     @Override
     public void onSuccess(Void aVoid) {

           // You can write what you want after the deleting process.
     })
     .addOnFailureListener(new OnFailureListener() {
     @Override
     public void onFailure(@NonNull Exception e) {

     }
     });

```
```
DocumentReference documentReference = firestore.collection("products").document(productid);
                                            documentReference.delete().addOnCompleteListener(new OnCompleteListener<Void>() {
                                                @Override
                                                public void onComplete(@NonNull Task<Void> task) {
                                                    if (task.isSuccessful()) {
                                                        Toast.makeText(Payment_Successful.this, "ok", Toast.LENGTH_SHORT).show();
                                                    } else {
                                                        Toast.makeText(Payment_Successful.this, "Not", Toast.LENGTH_SHORT).show();
                                                    }
                                                }

```