1 solutions

  • 0
    @ 2025-12-3 11:04:44

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b,n,s;
    	cin>>a>>b>>n;
    	s=a;
    	for(int i=2;i<=n;i++){
    		s+=b;}
    			cout<<s<<" ";	
    	return 0;
    }
    
    • 1

    Information

    ID
    804
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    9
    Tags
    (None)
    # Submissions
    8
    Accepted
    7
    Uploaded By