フィルターのクリア

not providing a fixed input

2 ビュー (過去 30 日間)
NAVNEET NAYAN
NAVNEET NAYAN 2018 年 7 月 24 日
編集済み: KALYAN ACHARJYA 2018 年 7 月 24 日
suppose I write a code:
function c=sum_of_two_numbers(a,b)
a=7;
b=8;
c=a+b;
end
here I have provided values of a and b. I want that whenever I run this code one should be asked to enter values of a and b and then getting C after entering a and b.

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 7 月 24 日
function c=sum_of_two_numbers(a,b)
a=input('Enter the 1st Number \n');
b=input('Enter the 2nd Number \n');
c=a+b;
fprintf('The result is %f',c);
end
  2 件のコメント
NAVNEET NAYAN
NAVNEET NAYAN 2018 年 7 月 24 日
Yes, this is working well. Thanks Kalyan..
KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 7 月 24 日
編集済み: KALYAN ACHARJYA 2018 年 7 月 24 日
Welcome..

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by