Mohammad Emaz Uddin
Followers: 0 Following: 0
Undergraduate student of Bangladesh University of Engineering and Technology on Department of Electrical and Electronic Engineering.
Statistics
0 Questions
1 Answer
RANK
75.731
of 295.527
REPUTATION
0
CONTRIBUTIONS
0 Questions
1 Answer
ANSWER ACCEPTANCE
0.00%
VOTES RECEIVED
0
RANK
of 20.242
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
RANK
of 154.057
CONTRIBUTIONS
0 Problems
0 Solutions
SCORE
0
NUMBER OF BADGES
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
Write a MATLAB script file that calculates the sum of first n natural numbers (the program could prompt the user for the number n). The program must use a “for” or “while” loop to accomplish this, and must NOT use the ready formula s = 1 2 n (n + 1).
clc; clear; close all; n= input('Enter numbers: '); sum=0; for i=1:1:n sum=sum+i; end disp (sum);
bijna 4 jaar ago | 0