cevap1

 avatar
unknown
plain_text
4 years ago
823 B
3
Indexable


pCode = input("Please enter the product code: ");
purPrice = input("Please enter the purchase price: ");
amount = input("Please enter the product amount: ");
profitRate = input("Please enter the product profit rate: ");
vatRat = input("Please enter the VAT Rate: ");

checkforfile=exist(strcat(pwd,'\','products.xls'),'file');
if checkforfile==0
    header = {'Product Code', 'Purchase Price' 'Amount' , 'Profit Rate', 'VAT Rate'};
    xlswrite('products',header,'shProducts','A1');
    N=0;
else
    N=size(xlsread('products','shProducts'),1);
end

newCode = {pCode};
newVals = {purPrice, amount, profitRate, vatRat};

AA=strcat('A',num2str(N+2));
BB=strcat('B',num2str(N+2));
xlswrite('products',NewName,'shProducts',AA);
xlswrite('products',NewValues,'shProducts',BB);

sum = purPrice*profitRate*vatRat; %satis fiyati
Editor is loading...