Programming Assignment Code :-
Programming Assignment 2.1
Due on 2022-02-10, 23:59 IST
~~~THERE IS SOME INVISIBLE CODE HERE~~~
main_program{
int N,m,n;
cin>>N;
int sum=0, carry=0;
repeat(N)
{
cin>>m>>n;
sum=(m+n+carry)%10;
cout<<sum;
carry=(m+n+carry)/10;
cout<<endl;
}
cout<<carry<<endl;
}
--------------------------------------------------------------------------------------
Programming Assignment 2.2
Due on 2022-02-10, 23:59 IST
~~~THERE IS SOME INVISIBLE CODE HERE~~~
main_program{
int N,m,n;
cin>>N;
int sum=0;
repeat(N)
{
cin>>m>>n;
sum+=m*n;
}
cout<<sum<<endl;
}
---------------------------------------------------------------------------------------
No comments:
Post a Comment
Keep your comments reader friendly. Be civil and respectful. No self-promotion or spam. Stick to the topic. Questions welcome.