Preview:
#include <iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main() {
   int p1n1,p1n2,p2n1,p2n2,sum1,sum2,roll1,roll2;
   char name1,name2;
   cout<<"player 1 enter your roll number "<<endl;
   cin>>roll1;
   cout<<"player 1 input your name plz "<<endl;
   cin>>name1;
   cout<<"player 2 input your name plz "<<endl;
   cin>>name2;
   cout<<"player 2 enter your roll number "<<endl;
   cin>>roll2;
   for(int j=1;j<=5;j++){
      
   cout<<"player 1 toss the dice twice:"<<endl;
   cin>>p1n1>>p1n2;
   sum1 = sum1 + p1n1 + p1n2; 
   
                     
           
       }      
   cout<<"total score of payer 1 is = "<<sum1<<endl;
   
   
     for(int j=1;j<=5;j++){
      
   cout<<"player 2 toss the dice twice:"<<endl;
   cin>>p2n1>>p2n2;
   sum2 = sum2 + p2n1 + p2n2; 
   
                     
           
       }      
   cout<<"total score of payer 2 is = "<<sum2<<endl;
    return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter