Answer to Question #335952 in C++ for GANIZANI

Question #335952

Write a C++ program that accepts an input value in Tambala from the user and

then the program should convert the value to equivalent value in Kwacha and

Tambala.

(For example, if the user enters 112 as input value, the program should display:

1 Kwacha and 12 tambala


1
Expert's answer
2022-05-01T19:06:09-0400
#include <iostream>
using namespace std;

int main()
{
    int tambala,y;
    cout<<"\nEnter value in Tambalas: ";
    cin>>tambala;
    
    if(tambala>0){
        cout<<tambala/100<<" Kwacha and "<<tambala%100<<"  tambala"<<endl;
    }
     return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS